This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new 0d1c902b56 refactor gradle build (#1163)
0d1c902b56 is described below
commit 0d1c902b5616e7b53224e2ecb4dca9463a7f48e4
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Jun 29 19:05:50 2026 +0100
refactor gradle build (#1163)
---
build.gradle | 16 ++++++++++++----
poi-excelant/build.gradle | 6 +++---
poi-integration/build.gradle | 6 +++---
poi-ooxml/build.gradle | 4 ++--
poi/build.gradle | 2 +-
5 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/build.gradle b/build.gradle
index 9b35f60be6..04123f0187 100644
--- a/build.gradle
+++ b/build.gradle
@@ -71,9 +71,16 @@ configurations {
}
}
+allprojects {
+ ext {
+ antVersion = '1.10.17'
+ junitVersion = '6.1.1'
+ }
+}
+
dependencies {
- antLibs("org.junit.jupiter:junit-jupiter:6.1.1")
- antLibs("org.apache.ant:ant-junitlauncher:1.10.17")
+ antLibs("org.junit.jupiter:junit-jupiter:${junitVersion}")
+ antLibs("org.apache.ant:ant-junitlauncher:${antVersion}")
}
ant.taskdef(name: "junit",
@@ -154,7 +161,6 @@ subprojects {
commonsCompressVersion = '1.28.0'
commonsIoVersion = '2.22.0'
commonsMathVersion = '3.6.1'
- junitVersion = '6.1.1'
log4jVersion = '2.26.0'
mockitoVersion = '5.23.0'
hamcrestVersion = '3.0'
@@ -163,6 +169,8 @@ subprojects {
graphics2dVersion = '3.0.5'
pdfboxVersion = '3.0.6'
saxonVersion = '12.9'
+ guavaVersion = '33.6.0-jre'
+ slf4jVersion = '2.0.17'
jspecifyVersion = '1.0.0'
xmlSecVersion = '3.0.6'
apiGuardianVersion = '1.1.2'
@@ -185,7 +193,7 @@ subprojects {
configureEach {
resolutionStrategy {
force "commons-io:commons-io:${commonsIoVersion}"
- force 'org.slf4j:slf4j-api:2.0.17'
+ force "org.slf4j:slf4j-api:${slf4jVersion}"
force 'com.fasterxml.woodstox:woodstox-core:7.1.1'
}
}
diff --git a/poi-excelant/build.gradle b/poi-excelant/build.gradle
index e200cb4a5d..3af9a89a5d 100644
--- a/poi-excelant/build.gradle
+++ b/poi-excelant/build.gradle
@@ -31,7 +31,7 @@ sourceSets {
}
dependencies {
- api 'org.apache.ant:ant:1.10.17'
+ api "org.apache.ant:ant:${antVersion}"
api project(':poi-ooxml')
compileOnly project(path: ':poi-ooxml', configuration: 'archives')
@@ -41,9 +41,9 @@ dependencies {
testImplementation(project(path: ':poi-ooxml', configuration: 'tests')) {
exclude group: 'org.apache.poi', module: 'poi-scratchpad'
}
- testImplementation 'com.google.guava:guava:33.6.0-jre'
+ testImplementation "com.google.guava:guava:${guavaVersion}"
testImplementation
"org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
- testImplementation 'org.slf4j:slf4j-simple:2.0.17'
+ testImplementation "org.slf4j:slf4j-simple:${slf4jVersion}"
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
testRuntimeOnly "org.jspecify:jspecify:${jspecifyVersion}"
}
diff --git a/poi-integration/build.gradle b/poi-integration/build.gradle
index 52c686ff2e..6f2a13ffa5 100644
--- a/poi-integration/build.gradle
+++ b/poi-integration/build.gradle
@@ -39,9 +39,9 @@ sourceSets {
}
dependencies {
- testImplementation 'org.apache.ant:ant:1.10.17'
+ testImplementation "org.apache.ant:ant:${antVersion}"
testImplementation 'org.apache.commons:commons-collections4:4.5.0'
- testImplementation 'com.google.guava:guava:33.6.0-jre'
+ testImplementation "com.google.guava:guava:${guavaVersion}"
testImplementation 'org.apache.commons:commons-csv:1.14.1'
misc(project(':poi-ooxml')) {
@@ -77,7 +77,7 @@ dependencies {
}
testImplementation project(path: ':poi-ooxml-lite-agent', configuration:
'archives')
testImplementation
"org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
- testImplementation 'org.slf4j:slf4j-simple:2.0.17'
+ testImplementation "org.slf4j:slf4j-simple:${slf4jVersion}"
testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}"
testRuntimeOnly "org.jspecify:jspecify:${jspecifyVersion}"
}
diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle
index c9a3eaaf4b..916e630e24 100644
--- a/poi-ooxml/build.gradle
+++ b/poi-ooxml/build.gradle
@@ -130,13 +130,13 @@ dependencies {
testImplementation 'org.reflections:reflections:0.10.2'
testImplementation 'org.openjdk.jmh:jmh-core:1.37'
testImplementation 'org.openjdk.jmh:jmh-generator-annprocess:1.37'
- testImplementation 'com.google.guava:guava:33.6.0-jre'
+ testImplementation "com.google.guava:guava:${guavaVersion}"
testImplementation 'com.github.rzymek:opczip:1.2.0'
// prevent slf4j warnings coming from xmlsec -> slf4j-api 1.7.x dependency
// see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/
testImplementation
"org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
- testImplementation 'org.slf4j:slf4j-simple:2.0.17'
+ testImplementation "org.slf4j:slf4j-simple:${slf4jVersion}"
javadocs project(':poi')
javadocs project(':poi-scratchpad')
diff --git a/poi/build.gradle b/poi/build.gradle
index ed2f2929a8..1b2574b00a 100644
--- a/poi/build.gradle
+++ b/poi/build.gradle
@@ -43,7 +43,7 @@ dependencies {
api 'com.zaxxer:SparseBitSet:1.3'
testImplementation 'org.reflections:reflections:0.10.2'
- testImplementation 'org.apache.ant:ant:1.10.17'
+ testImplementation "org.apache.ant:ant:${antVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]