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

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(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }

sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MODULE_COMPILE_PATH).asPath '--module-path', files(MODULE_COMPILE_PATH).asPath
] ]


onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {

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

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(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath '--module-path', files(MAIN_MODULE_PATH).asPath
] ]

onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--module-path', files(TEST_MODULE_PATH).asPath '--module-path', files(TEST_MODULE_PATH).asPath
] ]
classpath = files() classpath = files()

onlyIf {
jdkVersion > 8
}
} }





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

dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples:jar' dependsOn 'compileTestJava', ':poi-ooxml:testJar', ':poi-scratchpad:testJar', ':poi-examples:jar'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--module-path', files(MODULE_COMPILE_PATH).asPath '--module-path', files(MODULE_COMPILE_PATH).asPath
] ]
classpath = files() classpath = files()

onlyIf {
jdkVersion > 8
}
} }





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

dependsOn 'compileJava' dependsOn 'compileJava'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath '--module-path', files(MAIN_MODULE_PATH).asPath
] ]

onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {

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

dependsOn 'compileJava' dependsOn 'compileJava'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--module-path', sourceSets.main.compileClasspath.asPath '--module-path', sourceSets.main.compileClasspath.asPath
] ]
} }

onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {

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



task compileJava9(type: JavaCompile, dependsOn: 'compileJava') { task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--module-path', files(MAIN_MODULE_PATH).asPath '--module-path', files(MAIN_MODULE_PATH).asPath
] ]
} }

onlyIf {
jdkVersion > 8
}
} }


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

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

dependsOn 'compileJava', ':poi:jar' dependsOn 'compileJava', ':poi:jar'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath '--module-path', files(MAIN_MODULE_PATH).asPath
] ]

onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {
dependsOn 'compileTestJava', ':poi:testJar' dependsOn 'compileTestJava', ':poi:testJar'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--module-path', files(TEST_MODULE_PATH).asPath '--module-path', files(TEST_MODULE_PATH).asPath
] ]
classpath = files() classpath = files()

onlyIf {
jdkVersion > 8
}
} }





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

dependsOn 'compileJava', ':poi:jar' dependsOn 'compileJava', ':poi:jar'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', files(MAIN_MODULE_PATH).asPath '--module-path', files(MAIN_MODULE_PATH).asPath
] ]

onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {
dependsOn 'compileTestJava', ':poi:jar' dependsOn 'compileTestJava', ':poi:jar'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--module-path', files(TEST_MODULE_PATH).asPath '--module-path', files(TEST_MODULE_PATH).asPath
] ]
classpath = files() classpath = files()

onlyIf {
jdkVersion > 8
}
} }





+ 6
- 11
poi/build.gradle View File

dependsOn 'compileJava' dependsOn 'compileJava'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }
sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(JAVA9_OUT + VERSIONS9) destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC) source = file(JAVA9_SRC)
classpath = files() classpath = files()
'--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}", '--patch-module', "${MODULE_NAME}=${sourceSets.main.output.classesDirs.asPath}",
'--module-path', sourceSets.main.compileClasspath.asPath '--module-path', sourceSets.main.compileClasspath.asPath
] ]

onlyIf {
jdkVersion > 8
}
} }


task cacheJava9(type: Copy) { task cacheJava9(type: Copy) {
dependsOn 'compileTestJava' dependsOn 'compileTestJava'


javaCompiler = javaToolchains.compilerFor { javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(jdkVersion)
languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor) if (jdkVendor != '') vendor = JvmVendorSpec.matching(jdkVendor)
} }

sourceCompatibility = 1.9
targetCompatibility = 1.9
destinationDirectory = file(TEST9_OUT + VERSIONS9) destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC) source = file(TEST9_SRC)
options.compilerArgs = [ options.compilerArgs = [
'--module-path', files(MODULE_PATH).asPath '--module-path', files(MODULE_PATH).asPath
] ]
classpath = files() 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