-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
92 lines (82 loc) · 2.53 KB
/
build.gradle.kts
File metadata and controls
92 lines (82 loc) · 2.53 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import com.google.protobuf.gradle.*
plugins {
`java-library`
idea
id("com.google.protobuf") version "0.8.13"
id("net.bytebuddy.byte-buddy")
id("io.opentelemetry.instrumentation.auto-instrumentation")
muzzle
}
muzzle {
pass {
group = "io.grpc"
module = "grpc-core"
versions = "[1.5.0,)"
// for body capture via com.google.protobuf.util.JsonFormat
extraDependency("io.grpc:grpc-protobuf:1.5.0")
extraDependency("io.grpc:grpc-netty:1.5.0")
}
}
afterEvaluate{
io.opentelemetry.instrumentation.gradle.bytebuddy.ByteBuddyPluginConfigurator(project,
sourceSets.main.get(),
"io.opentelemetry.javaagent.tooling.muzzle.collector.MuzzleCodeGenerationPlugin",
project(":javaagent-tooling").configurations["instrumentationMuzzle"] + configurations.runtimeClasspath
).configure()
}
idea {
module {
sourceDirs.add(file("${projectDir}/build/generated/source/proto/test/proto"))
}
}
protobuf {
protoc {
// The artifact spec for the Protobuf Compiler
artifact = "com.google.protobuf:protoc:3.3.0"
}
plugins {
id("grpc") {
artifact = "io.grpc:protoc-gen-grpc-java:1.5.0"
}
}
generateProtoTasks {
all().forEach { task ->
task.plugins {
id("grpc") {
}
}
}
}
}
val versions: Map<String, String> by extra
val grpcVersion = "1.5.0"
dependencies {
api("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grpc-1.5:${versions["opentelemetry_java_agent"]}")
api("io.opentelemetry.instrumentation:opentelemetry-grpc-1.5:${versions["opentelemetry_java_agent"]}")
compileOnly("io.grpc:grpc-core:${grpcVersion}")
compileOnly("io.grpc:grpc-protobuf:${grpcVersion}")
compileOnly("io.grpc:grpc-stub:${grpcVersion}")
compileOnly("io.grpc:grpc-netty:${grpcVersion}")
implementation("javax.annotation:javax.annotation-api:1.3.2")
testImplementation(project(":testing-common"))
testImplementation("io.grpc:grpc-core:${grpcVersion}") {
version {
strictly(grpcVersion)
}
}
testImplementation("io.grpc:grpc-protobuf:${grpcVersion}") {
version {
strictly(grpcVersion)
}
}
testImplementation("io.grpc:grpc-stub:${grpcVersion}") {
version {
strictly(grpcVersion)
}
}
testImplementation("io.grpc:grpc-netty:${grpcVersion}") {
version {
strictly(grpcVersion)
}
}
}