From edee60d87a0f3b6d54d056a8f63dd42a386eb593 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 25 Dec 2022 23:56:32 +0000 Subject: rebuild module-info.class files even if Java8 used git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906207 13f79535-47bb-0310-9956-ffa450edef68 --- poi-excelant/build.gradle | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'poi-excelant') diff --git a/poi-excelant/build.gradle b/poi-excelant/build.gradle index 3d72c8dcbd..aa67f1f13d 100644 --- a/poi-excelant/build.gradle +++ b/poi-excelant/build.gradle @@ -69,9 +69,11 @@ task compileJava9(type: JavaCompile) { dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' javaCompiler = javaToolchains.compilerFor { - languageVersion = JavaLanguageVersion.of(jdkVersion) + languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) } + sourceCompatibility = 1.9 + targetCompatibility = 1.9 destinationDirectory = file(JAVA9_OUT + VERSIONS9) source = file(JAVA9_SRC) classpath = files() @@ -79,10 +81,6 @@ task compileJava9(type: JavaCompile) { '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--module-path', files(MAIN_MODULE_PATH).asPath ] - - onlyIf { - jdkVersion > 8 - } } task cacheJava9(type: Copy) { @@ -96,9 +94,11 @@ task compileTest9(type: JavaCompile) { dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' javaCompiler = javaToolchains.compilerFor { - languageVersion = JavaLanguageVersion.of(jdkVersion) + languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion)) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) } + sourceCompatibility = 1.9 + targetCompatibility = 1.9 destinationDirectory = file(TEST9_OUT + VERSIONS9) source = file(TEST9_SRC) options.compilerArgs = [ @@ -106,10 +106,6 @@ task compileTest9(type: JavaCompile) { '--module-path', files(TEST_MODULE_PATH).asPath ] classpath = files() - - onlyIf { - jdkVersion > 8 - } } -- cgit v1.2.3