-
Notifications
You must be signed in to change notification settings - Fork 917
/
Copy pathbuild.gradle.kts
135 lines (120 loc) · 3.61 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
plugins {
id("otel.library-instrumentation")
id("org.graalvm.buildtools.native")
}
dependencies {
compileOnly(project(":muzzle"))
// pin the version strictly to avoid overriding by dependencyManagement versions
compileOnly("ch.qos.logback:logback-classic") {
version {
// compiling against newer version than the earliest supported version (1.0.0) to support
// features added in 1.3.0
strictly("1.3.0")
}
}
compileOnly("org.slf4j:slf4j-api") {
version {
strictly("2.0.0")
}
}
compileOnly("net.logstash.logback:logstash-logback-encoder") {
version {
strictly("3.0")
}
}
if (findProperty("testLatestDeps") as Boolean) {
testImplementation("ch.qos.logback:logback-classic:latest.release")
} else {
testImplementation("ch.qos.logback:logback-classic") {
version {
strictly("1.0.0")
}
}
testImplementation("org.slf4j:slf4j-api") {
version {
strictly("1.6.4")
}
}
}
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
}
graalvmNative {
binaries.all {
resources.autodetect()
}
// See https://github.com/graalvm/native-build-tools/issues/572
metadataRepository {
enabled.set(false)
}
toolchainDetection.set(false)
}
// To be able to execute the tests as GraalVM native executables
configurations.configureEach {
exclude("org.apache.groovy", "groovy")
exclude("org.apache.groovy", "groovy-json")
exclude("org.spockframework", "spock-core")
}
val latestDepTest = findProperty("testLatestDeps") as Boolean
testing {
suites {
val slf4j2ApiTest by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":instrumentation:logback:logback-appender-1.0:library"))
implementation("io.opentelemetry:opentelemetry-sdk-testing")
implementation(project(":testing-common"))
if (latestDepTest) {
implementation("ch.qos.logback:logback-classic:latest.release")
implementation("org.slf4j:slf4j-api:latest.release")
implementation("net.logstash.logback:logstash-logback-encoder:latest.release")
} else {
implementation("ch.qos.logback:logback-classic") {
version {
strictly("1.3.0")
}
}
implementation("org.slf4j:slf4j-api") {
version {
strictly("2.0.0")
}
}
implementation("net.logstash.logback:logstash-logback-encoder") {
version {
strictly("3.0")
}
}
}
}
}
val asyncAppenderTest by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":instrumentation:logback:logback-appender-1.0:library"))
implementation("io.opentelemetry:opentelemetry-sdk-testing")
implementation(project(":testing-common"))
if (latestDepTest) {
implementation("ch.qos.logback:logback-classic:latest.release")
} else {
implementation("ch.qos.logback:logback-classic") {
version {
// 1.0.4 is the first version that has ch.qos.logback.classic.AsyncAppender
// we are using 1.0.7 because of https://jira.qos.ch/browse/LOGBACK-720
strictly("1.0.7")
}
}
implementation("org.slf4j:slf4j-api") {
version {
strictly("1.6.4")
}
}
}
}
}
}
}
tasks {
check {
dependsOn(testing.suites)
}
}
tasks.withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}