git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1906232 13f79535-47bb-0310-9956-ffa450edef68tags/REL_5_2_4
} | } | ||||
var srcDep = [ | var srcDep = [ | ||||
':poi:cacheJava9', | |||||
':poi:cacheTest9', | |||||
':poi-ooxml-full:cacheJava9', | |||||
':poi-ooxml-lite-agent:cacheJava9', | |||||
':poi-ooxml:cacheJava9', | |||||
':poi-ooxml:cacheTest9', | |||||
':poi-scratchpad:cacheJava9', | |||||
':poi-scratchpad:cacheTest9', | |||||
':poi-excelant:cacheJava9', | |||||
':poi-excelant:cacheTest9', | |||||
':poi-examples:cacheJava9', | |||||
':poi-integration:cacheTest9', | |||||
':poi-ooxml-lite:cacheJava9', | |||||
':poi:compileJava9', | |||||
':poi:compileTest9', | |||||
':poi-ooxml-full:compileJava9', | |||||
':poi-ooxml-lite-agent:compileJava9', | |||||
':poi-ooxml:compileJava9', | |||||
':poi-ooxml:compileTest9', | |||||
':poi-scratchpad:compileJava9', | |||||
':poi-scratchpad:compileTest9', | |||||
':poi-excelant:compileJava9', | |||||
':poi-excelant:compileTest9', | |||||
':poi-examples:compileJava9', | |||||
':poi-integration:compileTest9', | |||||
':poi-ooxml-lite:compileJava9', | |||||
':poi-ooxml-lite:generateModuleInfo' | ':poi-ooxml-lite:generateModuleInfo' | ||||
] | ] | ||||
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
} | } | ||||
} | } | ||||
] | ] | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
jar { | jar { | ||||
dependsOn cacheJava9 | |||||
dependsOn compileJava9 | |||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
manifest { | manifest { | ||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | ||||
} | } |
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
} | } | ||||
test { | test { | ||||
if (jdkVersion > 8) { | |||||
output.dir(TEST9_OUT, builtBy: 'cacheTest9') | |||||
} | |||||
output.dir(TEST9_OUT, builtBy: 'compileTest9') | |||||
} | } | ||||
} | } | ||||
] | ] | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
task compileTest9(type: JavaCompile) { | task compileTest9(type: JavaCompile) { | ||||
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' | dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar' | ||||
} | } | ||||
task cacheTest9(type: Copy) { | |||||
dependsOn 'compileTest9' | |||||
from(file(TEST9_OUT + VERSIONS9)) | |||||
into(TEST9_SRC) | |||||
} | |||||
jar { | jar { | ||||
dependsOn cacheJava9 | |||||
dependsOn compileJava9 | |||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
manifest { | manifest { | ||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | ||||
} | } | ||||
// Create a separate jar for test-code to depend on it in other projects | // Create a separate jar for test-code to depend on it in other projects | ||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency | // 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") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests") | ||||
classifier 'tests' | classifier 'tests' | ||||
// ignore second module-info.class from main | // ignore second module-info.class from main | ||||
duplicatesStrategy = 'exclude' | duplicatesStrategy = 'exclude' | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from TEST9_SRC include '*.class' | |||||
} | |||||
} | |||||
from sourceSets.test.output + sourceSets.main.output | from sourceSets.test.output + sourceSets.main.output | ||||
manifest { | manifest { |
sourceSets { | sourceSets { | ||||
test { | test { | ||||
if (jdkVersion > 8) { | |||||
output.dir(TEST9_OUT, builtBy: 'cacheTest9') | |||||
} | |||||
output.dir(TEST9_OUT, builtBy: 'compileTest9') | |||||
if (IBMVM) { | if (IBMVM) { | ||||
java { | java { | ||||
exclude '**/HeapDump**' | exclude '**/HeapDump**' | ||||
} | } | ||||
task cacheTest9(type: Copy) { | |||||
dependsOn 'compileTest9' | |||||
from(file(TEST9_OUT + VERSIONS9)) | |||||
into(TEST9_SRC) | |||||
} | |||||
jar { | jar { | ||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
// Create a separate jar for test-code to depend on it in other projects | // Create a separate jar for test-code to depend on it in other projects | ||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency | // 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") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests") | ||||
classifier 'tests' | classifier 'tests' | ||||
// ignore second module-info.class from main | // ignore second module-info.class from main | ||||
duplicatesStrategy = 'exclude' | duplicatesStrategy = 'exclude' | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from TEST9_SRC include '*.class' | |||||
} | |||||
} | |||||
from sourceSets.test.output + sourceSets.main.output | from sourceSets.test.output + sourceSets.main.output | ||||
manifest { | manifest { |
// TypeSystemHolder.class is in the resources | // TypeSystemHolder.class is in the resources | ||||
output.dir(BEANS_RES, builtBy: 'generate_beans') | output.dir(BEANS_RES, builtBy: 'generate_beans') | ||||
compileClasspath += files(BEANS_RES) | compileClasspath += files(BEANS_RES) | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
java { | java { | ||||
srcDirs = [BEANS_SRC] | srcDirs = [BEANS_SRC] | ||||
} | } | ||||
] | ] | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
task copy_xsds(type: Copy) { | task copy_xsds(type: Copy) { | ||||
from ('src/main/xmlschema/org/apache/poi/xdgf') | from ('src/main/xmlschema/org/apache/poi/xdgf') | ||||
from ('src/main/xmlschema/org/apache/poi/schemas') { | from ('src/main/xmlschema/org/apache/poi/schemas') { | ||||
jar { | jar { | ||||
dependsOn 'sourceJar' | dependsOn 'sourceJar' | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
manifest { | manifest { | ||||
attributes ('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | attributes ('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | ||||
} | } |
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
jar { | jar { | ||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
manifest { | manifest { | ||||
attributes ( | attributes ( | ||||
'Automatic-Module-Name' : MODULE_NAME, | 'Automatic-Module-Name' : MODULE_NAME, |
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
compileClasspath += files(BEANS_RES) | compileClasspath += files(BEANS_RES) | ||||
java { | java { | ||||
srcDirs += BEANS_SRC | srcDirs += BEANS_SRC | ||||
} | } | ||||
} | } | ||||
task cacheJava9(type: Copy, dependsOn: 'compileJava9') { | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
jar { | jar { | ||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
} | } | ||||
} | } | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
// ignore second module-info.class from poi-ooxml-full | // ignore second module-info.class from poi-ooxml-full | ||||
// duplicatesStrategy = 'exclude' | // duplicatesStrategy = 'exclude' | ||||
includeEmptyDirs = false | includeEmptyDirs = false |
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
} | } | ||||
test { | test { | ||||
if (jdkVersion > 8) { | |||||
output.dir(TEST9_OUT, builtBy: 'cacheTest9') | |||||
} | |||||
output.dir(TEST9_OUT, builtBy: 'compileTest9') | |||||
} | } | ||||
} | } | ||||
] | ] | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
task compileTest9(type: JavaCompile) { | task compileTest9(type: JavaCompile) { | ||||
dependsOn 'compileTestJava', ':poi:testJar' | dependsOn 'compileTestJava', ':poi:testJar' | ||||
} | } | ||||
task cacheTest9(type: Copy) { | |||||
dependsOn 'compileTest9' | |||||
from(file(TEST9_OUT + VERSIONS9)) | |||||
into(TEST9_SRC) | |||||
} | |||||
jar { | jar { | ||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
manifest { | manifest { | ||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | ||||
} | } | ||||
// ignore second module-info.class from main | // ignore second module-info.class from main | ||||
duplicatesStrategy = 'exclude' | duplicatesStrategy = 'exclude' | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from TEST9_SRC include '*.class' | |||||
} | |||||
} | |||||
from sourceSets.test.output + sourceSets.main.output | from sourceSets.test.output + sourceSets.main.output | ||||
manifest { | manifest { |
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
} | } | ||||
test { | test { | ||||
if (jdkVersion > 8) { | |||||
output.dir(TEST9_OUT, builtBy: 'cacheTest9') | |||||
} | |||||
output.dir(TEST9_OUT, builtBy: 'compileTest9') | |||||
} | } | ||||
} | } | ||||
] | ] | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
task compileTest9(type: JavaCompile) { | task compileTest9(type: JavaCompile) { | ||||
dependsOn 'compileTestJava', ':poi:jar' | dependsOn 'compileTestJava', ':poi:jar' | ||||
} | } | ||||
task cacheTest9(type: Copy) { | |||||
dependsOn 'compileTest9' | |||||
from(file(TEST9_OUT + VERSIONS9)) | |||||
into(TEST9_SRC) | |||||
} | |||||
jar { | jar { | ||||
destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}") | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
manifest { | manifest { | ||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | ||||
} | } | ||||
// ignore second module-info.class from main | // ignore second module-info.class from main | ||||
duplicatesStrategy = 'exclude' | duplicatesStrategy = 'exclude' | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from TEST9_SRC include '*.class' | |||||
} | |||||
} | |||||
from sourceSets.test.output + sourceSets.main.output | from sourceSets.test.output + sourceSets.main.output | ||||
manifest { | manifest { |
sourceSets { | sourceSets { | ||||
main { | main { | ||||
if (jdkVersion > 8) { | |||||
output.dir(JAVA9_OUT, builtBy: 'cacheJava9') | |||||
} | |||||
output.dir(JAVA9_OUT, builtBy: 'compileJava9') | |||||
java { | java { | ||||
// also include the generated Version.java | // also include the generated Version.java | ||||
srcDirs += 'build/generated-sources' | srcDirs += 'build/generated-sources' | ||||
} | } | ||||
} | } | ||||
test { | test { | ||||
if (jdkVersion > 8) { | |||||
output.dir(TEST9_OUT, builtBy: 'cacheTest9') | |||||
} | |||||
output.dir(TEST9_OUT, builtBy: 'compileTest9') | |||||
} | } | ||||
} | } | ||||
api "commons-io:commons-io:${commonsIoVersion}" | api "commons-io:commons-io:${commonsIoVersion}" | ||||
api 'com.zaxxer:SparseBitSet:1.2' | api 'com.zaxxer:SparseBitSet:1.2' | ||||
api "org.apache.logging.log4j:log4j-api:${log4jVersion}" | api "org.apache.logging.log4j:log4j-api:${log4jVersion}" | ||||
// implementation 'javax.activation:activation:1.1.1' | |||||
testImplementation 'org.reflections:reflections:0.10.2' | testImplementation 'org.reflections:reflections:0.10.2' | ||||
testImplementation 'org.apache.ant:ant:1.10.12' | testImplementation 'org.apache.ant:ant:1.10.12' | ||||
] | ] | ||||
} | } | ||||
task cacheJava9(type: Copy) { | |||||
dependsOn 'compileJava9' | |||||
from(file(JAVA9_OUT + VERSIONS9)) | |||||
into(JAVA9_SRC) | |||||
} | |||||
task compileTest9(type: JavaCompile) { | task compileTest9(type: JavaCompile) { | ||||
dependsOn 'compileTestJava' | dependsOn 'compileTestJava' | ||||
classpath = files() | classpath = files() | ||||
} | } | ||||
task cacheTest9(type: Copy) { | |||||
dependsOn 'compileTest9' | |||||
from(file(TEST9_OUT + VERSIONS9)) | |||||
into(TEST9_SRC) | |||||
} | |||||
jar { | jar { | ||||
dependsOn cacheJava9 | |||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from JAVA9_SRC include '*.class' | |||||
} | |||||
} | |||||
dependsOn compileJava9 | |||||
manifest { | manifest { | ||||
attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | attributes('Automatic-Module-Name': MODULE_NAME, 'Multi-Release': 'true') | ||||
// Create a separate jar for test-code to depend on it in other projects | // Create a separate jar for test-code to depend on it in other projects | ||||
// See http://stackoverflow.com/questions/5144325/gradle-test-dependency | // 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") | destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}-tests") | ||||
classifier 'tests' | classifier 'tests' | ||||
// ignore second module-info.class from main | // ignore second module-info.class from main | ||||
duplicatesStrategy = 'exclude' | duplicatesStrategy = 'exclude' | ||||
if (jdkVersion == 8) { | |||||
into('META-INF/versions/9') { | |||||
from TEST9_SRC include '*.class' | |||||
} | |||||
} | |||||
from sourceSets.test.output + sourceSets.main.output | from sourceSets.test.output + sourceSets.main.output | ||||
manifest { | manifest { |