try to fix jaav 17 build

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-07-27 09:21:34 +00:00
parent c3fd22a71a
commit dcb6742a26
5 changed files with 5 additions and 5 deletions

View File

@ -212,7 +212,7 @@ subprojects {
failOnError = true failOnError = true
maxMemory = "1024M" maxMemory = "1024M"
javadocTool = javaToolchains.javadocToolFor { javadocTool = javaToolchains.javadocToolFor {
languageVersion = JavaLanguageVersion.of(Math.max(11,jdkVersion)) languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11)
} }
doFirst { doFirst {

View File

@ -59,7 +59,7 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11)
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }

View File

@ -69,7 +69,7 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11)
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)

View File

@ -60,7 +60,7 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava' dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion) languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11)
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)

View File

@ -94,7 +94,7 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava' dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(11) languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11)
} }
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)