-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle.kts
57 lines (50 loc) · 1.72 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import com.google.protobuf.gradle.*
plugins {
`java-library`
idea
id("com.google.protobuf") version "0.8.15"
id("org.hypertrace.publish-maven-central-plugin")
}
protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = "com.google.protobuf:protoc:3.11.4"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.37.0"
}
}
generateProtoTasks {
ofSourceSet("main").forEach {
it.plugins {
// Apply the "grpc" plugin whose spec is defined above, without options.
id("grpc")
}
}
}
}
idea {
module {
sourceDirs.add(file("${projectDir}/build/generated/source/proto/main/proto"))
}
}
val versions: Map<String, String> by extra
dependencies {
api("io.opentelemetry:opentelemetry-api:${versions["opentelemetry"]}")
api("io.opentelemetry.javaagent:opentelemetry-javaagent-api:${versions["opentelemetry_java_agent"]}")
implementation("org.slf4j:slf4j-api:${versions["slf4j"]}")
api("com.google.protobuf:protobuf-java:3.11.4")
api("com.google.protobuf:protobuf-java-util:3.11.4")
api("io.grpc:grpc-stub:1.37.0")
api("io.grpc:grpc-protobuf:1.37.0")
api("io.grpc:grpc-netty:1.37.0")
if (JavaVersion.current().isJava9Compatible) {
// Workaround for @javax.annotation.Generated
// see: https://github.com/grpc/grpc-java/issues/3633
api("javax.annotation:javax.annotation-api:1.3.1")
}
// convert yaml to json, since java protobuf impl supports only json
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.11.3")
api("com.blogspot.mydailyjava:weak-lock-free:0.17")
}