aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'poi-ooxml/build.gradle')
-rw-r--r--poi-ooxml/build.gradle16
1 files changed, 6 insertions, 10 deletions
diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle
index 037dd59c05..e92d7e2534 100644
--- a/poi-ooxml/build.gradle
+++ b/poi-ooxml/build.gradle
@@ -180,9 +180,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()
@@ -190,10 +192,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) {
@@ -207,9 +205,11 @@ task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava', ':poi:testJar'
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 = [
@@ -217,10 +217,6 @@ task compileTest9(type: JavaCompile) {
'--module-path', files(TEST_MODULE_PATH).asPath
]
classpath = files()
-
- onlyIf {
- jdkVersion > 8
- }
}