Browse Source

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
tags/REL_5_2_4
PJ Fanning 1 year ago
parent
commit
edee60d87a

+ 3
- 7
poi-examples/build.gradle View File

@@ -59,10 +59,11 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad: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()
@@ -70,11 +71,6 @@ task compileJava9(type: JavaCompile) {
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath
]


onlyIf {
jdkVersion > 8
}
}

task cacheJava9(type: Copy) {

+ 6
- 10
poi-excelant/build.gradle View File

@@ -69,9 +69,11 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad: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()
@@ -79,10 +81,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) {
@@ -96,9 +94,11 @@ task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad: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 = [
@@ -106,10 +106,6 @@ task compileTest9(type: JavaCompile) {
'--module-path', files(TEST_MODULE_PATH).asPath
]
classpath = files()

onlyIf {
jdkVersion > 8
}
}



+ 3
- 5
poi-integration/build.gradle View File

@@ -107,9 +107,11 @@ task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples: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 = [
@@ -117,10 +119,6 @@ task compileTest9(type: JavaCompile) {
'--module-path', files(MODULE_COMPILE_PATH).asPath
]
classpath = files()

onlyIf {
jdkVersion > 8
}
}



+ 3
- 5
poi-ooxml-full/build.gradle View File

@@ -60,9 +60,11 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava'

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()
@@ -70,10 +72,6 @@ task compileJava9(type: JavaCompile) {
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath
]

onlyIf {
jdkVersion > 8
}
}

task cacheJava9(type: Copy) {

+ 3
- 5
poi-ooxml-lite-agent/build.gradle View File

@@ -42,9 +42,11 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava'

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()
@@ -54,10 +56,6 @@ task compileJava9(type: JavaCompile) {
'--module-path', sourceSets.main.compileClasspath.asPath
]
}

onlyIf {
jdkVersion > 8
}
}

task cacheJava9(type: Copy) {

+ 3
- 5
poi-ooxml-lite/build.gradle View File

@@ -101,9 +101,11 @@ sourcesJar.dependsOn 'compileOoxmlLite'

task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
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()
@@ -113,10 +115,6 @@ task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
'--module-path', files(MAIN_MODULE_PATH).asPath
]
}

onlyIf {
jdkVersion > 8
}
}

task cacheJava9(type: Copy, dependsOn: 'compileJava9') {

+ 6
- 10
poi-ooxml/build.gradle View File

@@ -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
}
}



+ 6
- 10
poi-scratchpad/build.gradle View File

@@ -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
}
}



+ 6
- 11
poi/build.gradle View File

@@ -94,9 +94,11 @@ task compileJava9(type: JavaCompile) {
dependsOn 'compileJava'

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()
@@ -104,10 +106,6 @@ 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) {
@@ -121,10 +119,11 @@ task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava'

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 = [
@@ -132,10 +131,6 @@ task compileTest9(type: JavaCompile) {
'--module-path', files(MODULE_PATH).asPath
]
classpath = files()

onlyIf {
jdkVersion > 8
}
}



BIN
poi/src/main/java9/module-info.class View File


BIN
poi/src/test/java9/module-info.class View File


Loading…
Cancel
Save