]> source.dussan.org Git - poi.git/commitdiff
jdk8 build issue
authorPJ Fanning <fanningpj@apache.org>
Sat, 29 Oct 2022 08:52:46 +0000 (08:52 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sat, 29 Oct 2022 08:52:46 +0000 (08:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904914 13f79535-47bb-0310-9956-ffa450edef68

poi/build.gradle

index ec0aa868e93f0583b5695876229b99bcb267ac3f..6879ef65ae15a9cf32c94977fa73c219bad14432 100644 (file)
@@ -95,6 +95,7 @@ task compileJava9(type: JavaCompile) {
 
     javaCompiler = javaToolchains.compilerFor {
         languageVersion = JavaLanguageVersion.of(jdkVersion)
+        if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
     }
     destinationDirectory = file(JAVA9_OUT + VERSIONS9)
     source = file(JAVA9_SRC)
@@ -103,6 +104,10 @@ task compileJava9(type: JavaCompile) {
         '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
         '--module-path', sourceSets.main.compileClasspath.asPath
     ]
+
+    onlyIf {
+        jdkVersion > 8
+    }
 }
 
 task cacheJava9(type: Copy) {