Fix building with JDK 20-ea due to missing experimental flag in java17Test

This commit is contained in:
Christian Beikov 2022-08-30 19:13:17 +02:00
parent b66bc976ac
commit 3352486633
1 changed files with 6 additions and 0 deletions

View File

@ -259,6 +259,12 @@ if ( gradle.ext.javaVersions.test.release.asInt() >= 17 ) {
useJUnitPlatform() useJUnitPlatform()
testClassesDirs = sourceSets.testJava17.output.classesDirs testClassesDirs = sourceSets.testJava17.output.classesDirs
classpath = sourceSets.testJava17.runtimeClasspath classpath = sourceSets.testJava17.runtimeClasspath
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 19 ) {
logger.warn( "The version of Java bytecode that will be tested is not supported by Bytebuddy by default. " +
" Setting 'net.bytebuddy.experimental=true'." )
systemProperty 'net.bytebuddy.experimental', true
}
} }
testClasses.dependsOn compileTestJava17Java testClasses.dependsOn compileTestJava17Java