Fix wrong toolchain configuration for java17 tests

This commit is contained in:
Andrea Boriero 2022-08-31 11:07:23 +02:00
parent 2be1c9a504
commit 456e43957e
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ tasks.withType( Test.class ).each { test ->
}
// Tests with records
if ( gradle.ext.javaVersions.test.release.asInt() >= 17 ) {
if ( gradle.ext.javaVersions.test.release.asInt() >= 17 && gradle.ext.javaToolchainEnabled ) {
// Add a new source set, which contains tests that can run on JDK17+
sourceSets {