HHH-13271 Restore compatibility of build script with Java 8 too
This commit is contained in:
parent
daf0a297df
commit
2dbea0bbb2
|
@ -100,6 +100,7 @@ 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 )
|
||||||
|
if ( JavaVersion.current().isJava11Compatible() ) {
|
||||||
int majorJVMVersionInt = Integer.valueOf(JavaVersion.current().toString());
|
int majorJVMVersionInt = Integer.valueOf(JavaVersion.current().toString());
|
||||||
if (majorJVMVersionInt >= 12) {
|
if (majorJVMVersionInt >= 12) {
|
||||||
//The need to set `--source 8` applies to all JVMs after 11, and also to 11
|
//The need to set `--source 8` applies to all JVMs after 11, and also to 11
|
||||||
|
@ -108,6 +109,7 @@ javadoc {
|
||||||
System.out.println("Forcing Javadoc in Java 8 compatible mode");
|
System.out.println("Forcing Javadoc in Java 8 compatible mode");
|
||||||
options.addStringOption('-source', '8')
|
options.addStringOption('-source', '8')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( JavaVersion.current().isJava8Compatible() ) {
|
if ( JavaVersion.current().isJava8Compatible() ) {
|
||||||
options.addStringOption( 'Xdoclint:none', '-quiet' )
|
options.addStringOption( 'Xdoclint:none', '-quiet' )
|
||||||
|
|
Loading…
Reference in New Issue