diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index b68953b6fe..c751255161 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -259,6 +259,12 @@ if ( gradle.ext.javaVersions.test.release.asInt() >= 17 ) { useJUnitPlatform() testClassesDirs = sourceSets.testJava17.output.classesDirs 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