-
Notifications
You must be signed in to change notification settings - Fork 917
/
Copy pathbuild.gradle.kts
73 lines (64 loc) · 2.09 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
plugins {
id("otel.library-instrumentation")
}
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}
dependencies {
implementation(project(":instrumentation:runtime-telemetry:runtime-telemetry-java8:library"))
testImplementation("io.github.netmikey.logunit:logunit-jul:1.1.3")
}
tasks.create("generateDocs", JavaExec::class) {
group = "build"
description = "Generate table for README.md"
classpath = sourceSets.test.get().runtimeClasspath
mainClass.set("io.opentelemetry.instrumentation.runtimemetrics.java17.GenerateDocs")
systemProperties.set("jfr.readme.path", project.projectDir.toString() + "/README.md")
}
tasks {
val testG1 by registering(Test::class) {
filter {
includeTestsMatching("*G1GcMemoryMetricTest*")
}
include("**/*G1GcMemoryMetricTest.*")
jvmArgs("-XX:+UseG1GC")
}
val testPS by registering(Test::class) {
filter {
includeTestsMatching("*PsGcMemoryMetricTest*")
}
include("**/*PsGcMemoryMetricTest.*")
jvmArgs("-XX:+UseParallelGC")
}
val testSerial by registering(Test::class) {
filter {
includeTestsMatching("*SerialGcMemoryMetricTest*")
}
include("**/*SerialGcMemoryMetricTest.*")
jvmArgs("-XX:+UseSerialGC")
}
test {
filter {
excludeTestsMatching("*G1GcMemoryMetricTest")
excludeTestsMatching("*SerialGcMemoryMetricTest")
excludeTestsMatching("*PsGcMemoryMetricTest")
}
}
check {
dependsOn(testG1)
dependsOn(testPS)
dependsOn(testSerial)
}
tasks {
compileJava {
// We compile this module for java 8 because it is used as a dependency in spring-boot-autoconfigure.
// If this module is compiled for java 17 then gradle can figure out based on the metadata that
// spring-boot-autoconfigure has a dependency that requires 17 and fails the build when it is used
// in a project that targets an earlier java version.
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13384
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.release.set(null as Int?)
}
}
}