Skip to content

Commit 072bde9

Browse files
committed
Separate Java Toolchain for tests
to make sure that all the versions we release are compatible with all Java versions we are claiming to support, set a separate Java Toolchain for tests executions. * Expose `javaVersion` as project property to be able to control such a Java version externally, e.g., via GitHub Actions **Auto-cherry-pick to `4.0.x` & `3.2.x`**
1 parent f87a4a1 commit 072bde9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ configure(javaProjects) { subproject ->
222222

223223
useJUnitPlatform()
224224

225+
javaLauncher = javaToolchains.launcherFor {
226+
languageVersion = JavaLanguageVersion.of(project.hasProperty('javaVersion') ? project.javaVersion as int : 25)
227+
}
228+
225229
jvmArgs '--enable-native-access=ALL-UNNAMED'
226230
}
227231

0 commit comments

Comments
 (0)