diff options
author | PJ Fanning <fanningpj@apache.org> | 2022-12-25 23:56:32 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2022-12-25 23:56:32 +0000 |
commit | edee60d87a0f3b6d54d056a8f63dd42a386eb593 (patch) | |
tree | 77c547b6dc7b02190015c2049e0849dcecd97d7d /poi-scratchpad/build.gradle | |
parent | 664fe668b7e0d0b82102a9b5b02894f700ea6401 (diff) | |
download | poi-edee60d87a0f3b6d54d056a8f63dd42a386eb593.tar.gz poi-edee60d87a0f3b6d54d056a8f63dd42a386eb593.zip |
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
Diffstat (limited to 'poi-scratchpad/build.gradle')
-rw-r--r-- | poi-scratchpad/build.gradle | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/poi-scratchpad/build.gradle b/poi-scratchpad/build.gradle index 7e53bba708..baa3875d80 100644 --- a/poi-scratchpad/build.gradle +++ b/poi-scratchpad/build.gradle @@ -65,9 +65,11 @@ task compileJava9(type: JavaCompile) { dependsOn 'compileJava', ':poi: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() @@ -75,10 +77,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) { @@ -92,9 +90,11 @@ task compileTest9(type: JavaCompile) { dependsOn 'compileTestJava', ':poi: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 = [ @@ -102,10 +102,6 @@ task compileTest9(type: JavaCompile) { '--module-path', files(TEST_MODULE_PATH).asPath ] classpath = files() - - onlyIf { - jdkVersion > 8 - } } |