HHH-13271 Restore compatibility of build script with Java 8 too
This commit is contained in:
parent
9d30a5a024
commit
d39921bd34
|
@ -100,13 +100,15 @@ javadoc {
|
||||||
]
|
]
|
||||||
//Workaround to get the JVM version while ignoring the Gradle Enums for versions,
|
//Workaround to get the JVM version while ignoring the Gradle Enums for versions,
|
||||||
//as they never support upcoming JVM versions (doesn't have a isJava12Compatible() yet )
|
//as they never support upcoming JVM versions (doesn't have a isJava12Compatible() yet )
|
||||||
int majorJVMVersionInt = Integer.valueOf(JavaVersion.current().toString());
|
if ( JavaVersion.current().isJava11Compatible() ) {
|
||||||
if ( majorJVMVersionInt >= 12 ) {
|
int majorJVMVersionInt = Integer.valueOf(JavaVersion.current().toString());
|
||||||
//The need to set `--source 8` applies to all JVMs after 11, and also to 11
|
if (majorJVMVersionInt >= 12) {
|
||||||
//but after excluding the first two builds; see also specific comments on
|
//The need to set `--source 8` applies to all JVMs after 11, and also to 11
|
||||||
// https://bugs.openjdk.java.net/browse/JDK-8212233?focusedCommentId=14245762
|
//but after excluding the first two builds; see also specific comments on
|
||||||
System.out.println( "Forcing Javadoc in Java 8 compatible mode" );
|
// https://bugs.openjdk.java.net/browse/JDK-8212233?focusedCommentId=14245762
|
||||||
options.addStringOption( '-source', '8' )
|
System.out.println("Forcing Javadoc in Java 8 compatible mode");
|
||||||
|
options.addStringOption('-source', '8')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( JavaVersion.current().isJava8Compatible() ) {
|
if ( JavaVersion.current().isJava8Compatible() ) {
|
||||||
|
|
Loading…
Reference in New Issue