diff --git a/lib/build.gradle b/lib/build.gradle index 8e924467..fd1f64b8 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -71,7 +71,7 @@ java { compileJava { exclude 'module-info.java' // Required to be compatible with JDK 8+ - options.release = 11 + options.release = 8 } javadoc { @@ -130,7 +130,7 @@ task compileModuleInfoJava(type: JavaCompile) { } compileTestJava { - options.release = 11 + options.release = 8 options.compilerArgs = ["-Xlint:deprecation"] } @@ -142,14 +142,6 @@ def testJava8 = tasks.register('testJava8', Test) { languageVersion = JavaLanguageVersion.of(8) }) shouldRunAfter(tasks.named('test')) - - doFirst { - tasks.compileJava.options.release.set(8) - } - - doLast { - tasks.compileJava.options.release.set(11) - } } def testJava17 = tasks.register('testJava17', Test) { @@ -162,6 +154,10 @@ def testJava17 = tasks.register('testJava17', Test) { shouldRunAfter(tasks.named('test')) } +//tasks.named('compileTestJava').configure { +// options.release.set(11) +//} + tasks.named('check') { dependsOn(testJava8) dependsOn(testJava17)