Skip to content

Commit e9bb404

Browse files
committed
fix
1 parent ce01ea9 commit e9bb404

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

custom-checks/build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ otelJava.moduleName.set("io.opentelemetry.javaagent.customchecks")
1414
// We also can't seem to use the toolchain without the "--release" option. So disable everything.
1515

1616
java {
17-
sourceCompatibility = JavaVersion.VERSION_17
18-
targetCompatibility = JavaVersion.VERSION_17
17+
sourceCompatibility = JavaVersion.VERSION_21
18+
targetCompatibility = JavaVersion.VERSION_21
1919
toolchain {
2020
languageVersion.set(null as JavaLanguageVersion?)
2121
}
@@ -43,17 +43,17 @@ tasks {
4343
}
4444
}
4545

46-
// only test on java 17+
46+
// only test on java 21+
4747
val testJavaVersion: String? by project
48-
if (testJavaVersion != null && Integer.valueOf(testJavaVersion) < 17) {
48+
if (testJavaVersion != null && Integer.valueOf(testJavaVersion) < 21) {
4949
test {
5050
enabled = false
5151
}
5252
}
5353
}
5454

5555
tasks.withType<Test>().configureEach {
56-
// required on jdk17
56+
// required when accessing javac internals
5757
jvmArgs("--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED")
5858
jvmArgs("--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED")
5959
jvmArgs("--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED")

0 commit comments

Comments
 (0)