HHH-14323 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
parent 4bf0a96c22
commit 4c15128838
No known key found for this signature in database
GPG Key ID: B8D049359DC35ABC
1 changed files with 9 additions and 0 deletions

View File

@ -215,6 +215,15 @@ test {
systemProperty 'file.encoding', 'UTF-8'
}
// 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.