aboutsummaryrefslogtreecommitdiffstats
path: root/poi/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'poi/build.gradle')
-rw-r--r--poi/build.gradle69
1 files changed, 7 insertions, 62 deletions
diff --git a/poi/build.gradle b/poi/build.gradle
index 23d024c516..df8997bf8c 100644
--- a/poi/build.gradle
+++ b/poi/build.gradle
@@ -50,6 +50,7 @@ dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
+ // needed for locating the external references
javadocs project(':poi-ooxml')
javadocs project(':poi-scratchpad')
}
@@ -59,13 +60,6 @@ final Pattern MODULE_NOT_REGEX = ~'(poi[/\\\\][^/\\\\]+$|batik-script)'
final Pattern MODULE_REGEX = ~'\\.jar$'
final List MODULE_PATH = sourceSets.test.runtimeClasspath.findAll{ it.path =~ MODULE_REGEX && !(it.path =~ MODULE_NOT_REGEX) }.collect{ it.parent }.unique()
-java {
- sourceCompatibility = JavaVersion.VERSION_1_8
- targetCompatibility = JavaVersion.VERSION_1_8
- withJavadocJar()
- withSourcesJar()
-}
-
task compileJava9(type: JavaCompile) {
dependsOn 'compileJava'
@@ -110,8 +104,6 @@ task cacheTest9(type: Copy) {
}
jar {
- destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
-
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
into('META-INF/versions/9') {
from JAVA9_SRC include '*.class'
@@ -145,24 +137,12 @@ task testJar(type: Jar, dependsOn: testClasses) {
}
}
-sourcesJar {
- destinationDirectory = file("../build/dist/maven/${project.archivesBaseName}")
- exclude 'META-INF/services/**'
-}
-
javadoc {
- failOnError = true
+ dependsOn configurations.javadocs.dependencies.collect{ ':' + it.dependencyProject.name + ':compileJava' }
+
doFirst {
options {
- if (JavaVersion.current().isJava9Compatible()) {
- addBooleanOption('html5', true)
- }
- links 'https://poi.apache.org/apidocs/dev/'
- links 'https://docs.oracle.com/javase/8/docs/api/'
- use = true
- splitIndex = true
- source = "1.8"
- classpath += configurations.javadocs.files
+ classpath += files(configurations.javadocs.dependencies.collect{ it.dependencyProject.sourceSets.main.output.classesDirs })
}
}
}
@@ -174,39 +154,10 @@ artifacts {
test {
dependsOn { testJar }
- useJUnitPlatform()
-
doFirst {
- jvmArgs = [
- '-Djava.io.tmpdir=build',
- '-DPOI.testdata.path=../test-data',
- '-Djava.awt.headless=true',
- '-Djava.locale.providers=JRE,CLDR',
- '-Duser.language=en',
- '-Duser.country=US',
- '-Djavax.xml.stream.XMLInputFactory=com.sun.xml.internal.stream.XMLInputFactoryImpl',
- "-Dversion.id=${project.version}",
- '-ea',
- '-Djunit.jupiter.execution.parallel.enabled=true',
- '-Djunit.jupiter.execution.parallel.config.strategy=fixed',
- '-Djunit.jupiter.execution.parallel.config.fixed.parallelism=3'
- // -Xjit:verbose={compileStart|compileEnd},vlog=build/jit.log${no.jit.sherlock} ... if ${isIBMVM}
- ]
if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
- jvmArgs += [
- '-Dsun.reflect.debugModuleAccessChecks=true',
- '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true',
- '--illegal-access=warn',
-
+ jvmArgs << [
'--add-modules', MODULE_NAME,
-
- // see https://github.com/java9-modularity/gradle-modules-plugin/issues/97
- // opposed to the recommendation there, it doesn't work to add ... to the dependencies
- // testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.7.1'
- // gradles gradle-worker.jar is still not a JPMS module and thus runs as unnamed module
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.util=ALL-UNNAMED',
- '--add-exports','org.junit.platform.commons/org.junit.platform.commons.logging=ALL-UNNAMED',
-
'--module-path', '../build/dist/maven/poi-tests:' + files(MODULE_PATH).asPath,
]
}
@@ -216,16 +167,10 @@ test {
publishing {
publications {
POI(MavenPublication) {
- artifactId project.archivesBaseName
-
- from components.java
-
pom {
- name = 'Apache POI'
+ name = 'Apache POI - Common'
description = 'Apache POI - Java API To Access Microsoft Format Files'
}
}
}
-}
-
-generatePomFileForPOIPublication.destination = "../build/dist/maven/${project.archivesBaseName}/${project.archivesBaseName}-${project.version}.pom"
+} \ No newline at end of file