-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsb-ot-demo.java-compile.gradle.kts
More file actions
63 lines (54 loc) · 1.59 KB
/
Copy pathsb-ot-demo.java-compile.gradle.kts
File metadata and controls
63 lines (54 loc) · 1.59 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
/*
* Copyright (c) 2020-2025. Ivan Vakhrushev and others.
* https://github.com/mfvanek/spring-boot-open-telemetry-demo
*
* Licensed under the Apache License 2.0
*/
plugins {
id("java")
id("jacoco")
id("com.google.osdetector")
id("org.gradle.test-retry")
}
dependencies {
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
// https://github.com/netty/netty/issues/11020
if (osdetector.arch == "aarch_64") {
testImplementation("io.netty:netty-all:4.1.104.Final")
}
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withSourcesJar()
}
tasks {
withType<JavaCompile>().configureEach {
options.compilerArgs.add("-parameters")
options.compilerArgs.add("--should-stop=ifError=FLOW")
}
test {
useJUnitPlatform()
finalizedBy(jacocoTestReport, jacocoTestCoverageVerification)
maxParallelForks = 1
retry {
maxRetries.set(2)
maxFailures.set(5)
failOnPassedAfterRetry.set(false)
}
}
jacocoTestReport {
dependsOn(test)
reports {
xml.required.set(true)
html.required.set(true)
}
}
check {
dependsOn(jacocoTestCoverageVerification)
}
}