jdk19 build issue

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1904908 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-10-28 23:10:54 +00:00
parent 07f73d85be
commit 9798625cb9
6 changed files with 6 additions and 6 deletions

View File

@ -213,7 +213,7 @@ subprojects {
failOnError = true failOnError = true
maxMemory = "1024M" maxMemory = "1024M"
javadocTool = javaToolchains.javadocToolFor { javadocTool = javaToolchains.javadocToolFor {
languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11) languageVersion = JavaLanguageVersion.of(jdkVersion)
} }
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 >= 17 ? 17 : 11) languageVersion = JavaLanguageVersion.of(jdkVersion)
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 >= 17 ? 17 : 11) languageVersion = JavaLanguageVersion.of(jdkVersion)
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 >= 17 ? 17 : 11) languageVersion = JavaLanguageVersion.of(jdkVersion)
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)

View File

@ -207,7 +207,7 @@ task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava', ':poi:testJar' dependsOn 'compileTestJava', ':poi:testJar'
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion >= 17 ? 17 : 11) languageVersion = JavaLanguageVersion.of(jdkVersion)
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_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(jdkVersion >= 17 ? 17 : 11) languageVersion = JavaLanguageVersion.of(jdkVersion)
} }
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)