Skip to content

Commit abd3705

Browse files
artembilanspring-builds
authored andcommitted
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 (cherry picked from commit fd5538d)
1 parent 0726753 commit abd3705

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
@@ -280,6 +280,12 @@ configure(javaProjects) { subproject ->
280280
environment "SPRING_AMQP_DESERIALIZATION_TRUST_ALL", "true"
281281

282282
useJUnitPlatform()
283+
284+
javaLauncher = javaToolchains.launcherFor {
285+
languageVersion = JavaLanguageVersion.of(project.hasProperty('javaVersion') ? project.javaVersion as int : 25)
286+
}
287+
288+
jvmArgs '--enable-native-access=ALL-UNNAMED'
283289
}
284290

285291
checkstyle {

0 commit comments

Comments
 (0)