HHH-13682 Restore the system property net.bytebuddy.experimental=true in tests on JDK15+

Turns out it's necessary for JDKs with experimental support.
This commit is contained in:
Yoann Rodière 2020-04-14 15:21:33 +02:00 committed by Sanne Grinovero
parent 0b4bcce3fa
commit 588115bb0a
1 changed files with 9 additions and 0 deletions

View File

@ -208,6 +208,15 @@ processTestResources {
}
}
// Enable the experimental features of ByteBuddy with JDK 15+
test {
if ( Integer.valueOf( gradle.ext.testedJavaVersionAsEnum.getMajorVersion() ) >= 15 ) {
logger.warn( "The version of java that will be tested is not supported by Bytebuddy by default. " +
" Setting 'net.bytebuddy.experimental=true'." )
systemProperty 'net.bytebuddy.experimental', true
}
}
test {
if ( project.findProperty( 'log-test-progress' )?.toString()?.toBoolean() ) {
// Log a statement for each test.