Skip to content

Commit fd5538d

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 `3.2.x`**
1 parent b744511 commit fd5538d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ configure(javaProjects) { subproject ->
272272
environment "SPRING_AMQP_DESERIALIZATION_TRUST_ALL", "true"
273273

274274
useJUnitPlatform()
275+
276+
javaLauncher = javaToolchains.launcherFor {
277+
languageVersion = JavaLanguageVersion.of(project.hasProperty('javaVersion') ? project.javaVersion as int : 25)
278+
}
279+
280+
jvmArgs '--enable-native-access=ALL-UNNAMED'
275281
}
276282

277283
checkstyle {

0 commit comments

Comments
 (0)