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 0119f7b041 switch to java 17 minimum (#1129)
0119f7b041 is described below
commit 0119f7b0410609e3befea6049f347bd565eb71e5
Author: PJ Fanning <[email protected]>
AuthorDate: Thu Jun 11 11:09:51 2026 +0100
switch to java 17 minimum (#1129)
---
.github/workflows/test-gradle.yml | 4 ++--
build.gradle | 9 +++------
jenkins/create_jobs.groovy | 6 ++++--
poi-examples/build.gradle | 6 +++---
poi-excelant/build.gradle | 12 ++++++------
poi-integration/build.gradle | 6 +++---
poi-ooxml-full/build.gradle | 6 +++---
poi-ooxml-lite-agent/build.gradle | 6 +++---
poi-ooxml-lite/build.gradle | 6 +++---
poi-ooxml/build.gradle | 16 ++++++++--------
poi-scratchpad/build.gradle | 12 ++++++------
poi/build.gradle | 12 ++++++------
12 files changed, 50 insertions(+), 51 deletions(-)
diff --git a/.github/workflows/test-gradle.yml
b/.github/workflows/test-gradle.yml
index ebbb5dbc08..c6c7aadcbc 100644
--- a/.github/workflows/test-gradle.yml
+++ b/.github/workflows/test-gradle.yml
@@ -23,11 +23,11 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: 'temurin'
- java-version: '11'
+ java-version: '17'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
- run: ./gradlew check -PjdkVersion=11 --no-daemon --refresh-dependencies
+ run: ./gradlew check -PjdkVersion=17 --no-daemon --refresh-dependencies
diff --git a/build.gradle b/build.gradle
index 0330042074..dcc6cc09fb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -35,9 +35,6 @@ plugins {
id 'org.nosphere.apache.rat' version '0.8.1'
id 'distribution'
- // 6.2.0+ requires JDK 11
- // this is the version of the Gradle plugin, it usually includes a
- // different version of spotbugs itself
// Latest spotbugs: https://github.com/spotbugs/spotbugs
// Latest gradle plugin:
https://plugins.gradle.org/plugin/com.github.spotbugs
id 'com.github.spotbugs' version '6.4.8'
@@ -131,7 +128,7 @@ subprojects {
xmlSecVersion = '3.0.6'
apiGuardianVersion = '1.1.2'
- jdkVersion = (project.properties['jdkVersion'] ?: '11') as int
+ jdkVersion = (project.properties['jdkVersion'] ?: '17') as int
// see
https://github.com/gradle/gradle/blob/master/subprojects/jvm-services/src/main/java/org/gradle/internal/jvm/inspection/JvmVendor.java
jdkVendor = (project.properties['jdkVendor'] ?: '') as String
@@ -215,12 +212,12 @@ subprojects {
addBooleanOption('html5', true)
addBooleanOption('Xdoclint:all,-missing', true)
links 'https://poi.apache.org/apidocs/dev/'
- if (jdkVersion >= 23) links
'https://docs.oracle.com/en/java/javase/23/docs/api/' else links
'https://docs.oracle.com/en/java/javase/11/docs/api/'
+ if (jdkVersion >= 23) links
'https://docs.oracle.com/en/java/javase/23/docs/api/' else links
'https://docs.oracle.com/en/java/javase/17/docs/api/'
links 'https://xmlbeans.apache.org/docs/5.0.0/'
links
'https://www.javadocs.dev/org.apache.commons/commons-compress/1.28.0/'
use = true
splitIndex = true
- source = "11"
+ source = "17"
}
}
}
diff --git a/jenkins/create_jobs.groovy b/jenkins/create_jobs.groovy
index 432460ed4e..bd5def2131 100644
--- a/jenkins/create_jobs.groovy
+++ b/jenkins/create_jobs.groovy
@@ -43,7 +43,8 @@ def poijobs = [
trigger: 'H */12 * * *',
jenkinsLite: true,
],
- [ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays,
skipcigame: true
+ [ name: 'POI-DSL-1.11', jdk: '1.11', trigger: triggerSundays,
skipcigame: true,
+ disabled: true // JDK 11 is no longer supported by POI 6
],
[ name: 'POI-DSL-1.17', jdk: '1.17', trigger: 'H */12 * * *',
skipcigame: true
],
@@ -90,7 +91,8 @@ def poijobs = [
disabled: true // JDK 8 is no longer supported by POI 6
],
[ name: 'POI-DSL-Windows-1.11', jdk: '1.11', trigger: triggerSundays,
windows: true, slaves: 'Windows',
- jenkinsLite: true
+ jenkinsLite: true,
+ disabled: true // JDK 11 is no longer supported by POI 6
],
[ name: 'POI-DSL-Windows-1.17', jdk: '1.17', trigger: 'H */12 * * *',
windows: true, slaves: 'Windows', skipcigame: true
],
diff --git a/poi-examples/build.gradle b/poi-examples/build.gradle
index c8a5a0cca1..6eeb62b6ac 100644
--- a/poi-examples/build.gradle
+++ b/poi-examples/build.gradle
@@ -51,10 +51,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
diff --git a/poi-excelant/build.gradle b/poi-excelant/build.gradle
index 290125cebc..7b0673baea 100644
--- a/poi-excelant/build.gradle
+++ b/poi-excelant/build.gradle
@@ -61,10 +61,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
@@ -78,10 +78,10 @@ tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:jar', ':poi-scratchpad:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
diff --git a/poi-integration/build.gradle b/poi-integration/build.gradle
index 2f2e4571b3..58f1785c02 100644
--- a/poi-integration/build.gradle
+++ b/poi-integration/build.gradle
@@ -95,10 +95,10 @@ tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi-ooxml:testJar',
':poi-scratchpad:testJar', ':poi-examples:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
diff --git a/poi-ooxml-full/build.gradle b/poi-ooxml-full/build.gradle
index 13da5ae202..164543b298 100644
--- a/poi-ooxml-full/build.gradle
+++ b/poi-ooxml-full/build.gradle
@@ -58,10 +58,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
diff --git a/poi-ooxml-lite-agent/build.gradle
b/poi-ooxml-lite-agent/build.gradle
index 547299246b..0d4aeab9bb 100644
--- a/poi-ooxml-lite-agent/build.gradle
+++ b/poi-ooxml-lite-agent/build.gradle
@@ -40,10 +40,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
diff --git a/poi-ooxml-lite/build.gradle b/poi-ooxml-lite/build.gradle
index 32cd1c0ae3..2096837f2e 100644
--- a/poi-ooxml-lite/build.gradle
+++ b/poi-ooxml-lite/build.gradle
@@ -91,10 +91,10 @@ sourcesJar.dependsOn 'compileOoxmlLite'
task compileJava9(type: JavaCompile, dependsOn: 'compileJava') {
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle
index b77d63369f..93c422fc93 100644
--- a/poi-ooxml/build.gradle
+++ b/poi-ooxml/build.gradle
@@ -155,10 +155,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
@@ -172,10 +172,10 @@ tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi:testJar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
@@ -216,10 +216,10 @@ javadoc {
options {
addBooleanOption('html5', true)
links 'https://poi.apache.org/apidocs/dev/'
- if (jdkVersion >= 23) links
'https://docs.oracle.com/en/java/javase/23/docs/api/' else links
'https://docs.oracle.com/en/java/javase/11/docs/api/'
+ if (jdkVersion >= 23) links
'https://docs.oracle.com/en/java/javase/23/docs/api/' else links
'https://docs.oracle.com/en/java/javase/17/docs/api/'
use = true
splitIndex = true
- source = "11"
+ source = "17"
classpath += configurations.javadocs.files
}
}
diff --git a/poi-scratchpad/build.gradle b/poi-scratchpad/build.gradle
index e67aed79ae..c65c227cbc 100644
--- a/poi-scratchpad/build.gradle
+++ b/poi-scratchpad/build.gradle
@@ -56,10 +56,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava', ':poi:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
@@ -73,10 +73,10 @@ tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava', ':poi:jar'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
diff --git a/poi/build.gradle b/poi/build.gradle
index d11aaf9ac6..256d587a67 100644
--- a/poi/build.gradle
+++ b/poi/build.gradle
@@ -83,10 +83,10 @@ tasks.register('compileJava9', JavaCompile) {
dependsOn 'compileJava'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(JAVA9_OUT + VERSIONS9)
source = file(JAVA9_SRC)
classpath = files()
@@ -100,10 +100,10 @@ tasks.register('compileTest9', JavaCompile) {
dependsOn 'compileTestJava'
javaCompiler = javaToolchains.compilerFor {
- languageVersion = JavaLanguageVersion.of(Math.max(11, jdkVersion))
+ languageVersion = JavaLanguageVersion.of(Math.max(17, jdkVersion))
}
- sourceCompatibility = 11
- targetCompatibility = 11
+ sourceCompatibility = 17
+ targetCompatibility = 17
destinationDirectory = file(TEST9_OUT + VERSIONS9)
source = file(TEST9_SRC)
options.compilerArgs = [
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]