-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
40 lines (34 loc) · 1.16 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
plugins {
id("otel.library-instrumentation")
id("otel.animalsniffer-conventions")
}
val grpcVersion = "1.6.0"
dependencies {
library("io.grpc:grpc-core:$grpcVersion")
testLibrary("io.grpc:grpc-netty:$grpcVersion")
testLibrary("io.grpc:grpc-protobuf:$grpcVersion")
testLibrary("io.grpc:grpc-services:$grpcVersion")
testLibrary("io.grpc:grpc-stub:$grpcVersion")
testImplementation(project(":instrumentation:grpc-1.6:testing"))
}
tasks {
test {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
// latest dep test occasionally fails because network type is ipv6 instead of the expected ipv4
// and peer address is 0:0:0:0:0:0:0:1 instead of 127.0.0.1
jvmArgs("-Djava.net.preferIPv4Stack=true")
}
}
if (!(findProperty("testLatestDeps") as Boolean)) {
configurations.testRuntimeClasspath {
resolutionStrategy {
eachDependency {
// early versions of grpc are not compatible with netty 4.1.101.Final
if (requested.group == "io.netty") {
useVersion("4.1.100.Final")
}
}
}
}
}