aboutsummaryrefslogtreecommitdiffstats
path: root/poi/build.gradle
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-12-27 18:45:15 +0000
committerPJ Fanning <fanningpj@apache.org>2022-12-27 18:45:15 +0000
commit78516f50dc46beee5b6deb1edd678a91eb128f79 (patch)
treed1c799b72679423205d6d856b7718a089c53efa5 /poi/build.gradle
parent98d51e41398b658df158492a9b67a4b5d2ff2983 (diff)
downloadpoi-78516f50dc46beee5b6deb1edd678a91eb128f79.tar.gz
poi-78516f50dc46beee5b6deb1edd678a91eb128f79.zip
try to get rid of cached module-info classes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906232 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi/build.gradle')
-rw-r--r--poi/build.gradle40
1 files changed, 4 insertions, 36 deletions
diff --git a/poi/build.gradle b/poi/build.gradle
index ab2590b76e..c67e02d86a 100644
--- a/poi/build.gradle
+++ b/poi/build.gradle
@@ -24,18 +24,14 @@ configurations {
sourceSets {
main {
- if (jdkVersion > 8) {
- output.dir(JAVA9_OUT, builtBy: 'cacheJava9')
- }
+ output.dir(JAVA9_OUT, builtBy: 'compileJava9')
java {
// also include the generated Version.java
srcDirs += 'build/generated-sources'
}
}
test {
- if (jdkVersion > 8) {
- output.dir(TEST9_OUT, builtBy: 'cacheTest9')
- }
+ output.dir(TEST9_OUT, builtBy: 'compileTest9')
}
}
@@ -46,7 +42,6 @@ dependencies {
api "commons-io:commons-io:${commonsIoVersion}"
api 'com.zaxxer:SparseBitSet:1.2'
api "org.apache.logging.log4j:log4j-api:${log4jVersion}"
- // implementation 'javax.activation:activation:1.1.1'
testImplementation 'org.reflections:reflections:0.10.2'
testImplementation 'org.apache.ant:ant:1.10.12'
@@ -107,13 +102,6 @@ task compileJava9(type: JavaCompile) {
]
}
-task cacheJava9(type: Copy) {
- dependsOn 'compileJava9'
-
- from(file(JAVA9_OUT + VERSIONS9))
- into(JAVA9_SRC)
-}
-
task compileTest9(type: JavaCompile) {
dependsOn 'compileTestJava'
@@ -131,22 +119,8 @@ task compileTest9(type: JavaCompile) {
classpath = files()
}
-
-task cacheTest9(type: Copy) {
- dependsOn 'compileTest9'
-
- from(file(TEST9_OUT + VERSIONS9))
- into(TEST9_SRC)
-}
-
jar {
- dependsOn cacheJava9
-
- if (jdkVersion == 8) {
- into('META-INF/versions/9') {
- from JAVA9_SRC include '*.class'
- }
- }
+ dependsOn compileJava9
manifest {
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true')
@@ -155,19 +129,13 @@ jar {
// Create a separate jar for test-code to depend on it in other projects
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency
-task testJar(type: Jar, dependsOn: [ testClasses, cacheTest9 ]) {
+task testJar(type: Jar, dependsOn: [ testClasses, compileTest9 ]) {
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests")
classifier 'tests'
// ignore second module-info.class from main
duplicatesStrategy = 'exclude'
- if (jdkVersion == 8) {
- into('META-INF/versions/9') {
- from TEST9_SRC include '*.class'
- }
- }
-
from sourceSets.test.output + sourceSets.main.output
manifest {