Don't set Java release version when running with Java 8 which does not support this option yet
MODIFY
build.gradle
build.gradle
@@ -106,7 +106,9 @@ subprojects {
plugins.withType(JavaPlugin) {
project.tasks.withType(JavaCompile) { task ->
+ if (JavaVersion.current().isJava11Compatible()) {
task.options.release = 8
+ }
if (project.hasProperty("showDeprecation")) {
options.compilerArgs << "-Xlint:deprecation"
}
@@ -115,9 +117,11 @@ subprojects {
}
}
project.tasks.withType(GroovyCompile) { task ->
+ if (JavaVersion.current().isJava11Compatible()) {
task.options.release = 8
}
}
+ }
repositories {
if (project.hasProperty('useMavenLocal') && project.useMavenLocal.toBoolean()) {

Don't set Java release version when running with Java 8 which does not support this option yet