This is an automated email from the ASF dual-hosted git repository.

huaxingao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 059310ead7 Build: Restore JVM 11 for build-checks and build-javadoc 
(#14534)
059310ead7 is described below

commit 059310ead702814e5d95116210b9af77b29f6b94
Author: Manu Zhang <[email protected]>
AuthorDate: Tue Nov 11 07:42:23 2025 +0800

    Build: Restore JVM 11 for build-checks and build-javadoc (#14534)
---
 .github/workflows/java-ci.yml | 4 ++--
 spark/v4.0/build.gradle       | 8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml
index eb3bb2994f..1e3234d822 100644
--- a/.github/workflows/java-ci.yml
+++ b/.github/workflows/java-ci.yml
@@ -96,7 +96,7 @@ jobs:
     runs-on: ubuntu-24.04
     strategy:
       matrix:
-        jvm: [17, 21]
+        jvm: [11, 17, 21]
     steps:
     - uses: actions/checkout@v4
     - uses: actions/setup-java@v4
@@ -109,7 +109,7 @@ jobs:
     runs-on: ubuntu-24.04
     strategy:
       matrix:
-        jvm: [17, 21]
+        jvm: [11, 17, 21]
     steps:
     - uses: actions/checkout@v4
     - uses: actions/setup-java@v4
diff --git a/spark/v4.0/build.gradle b/spark/v4.0/build.gradle
index 4002c8470b..8ebed9bd43 100644
--- a/spark/v4.0/build.gradle
+++ b/spark/v4.0/build.gradle
@@ -21,8 +21,9 @@ String sparkMajorVersion = '4.0'
 String scalaVersion = '2.13'
 
 JavaVersion javaVersion = JavaVersion.current()
-if (javaVersion != JavaVersion.VERSION_17 && javaVersion != 
JavaVersion.VERSION_21) {
-  throw new GradleException("Spark 4.0 build requires JDK 17 or 21 but was 
executed with JDK " + javaVersion)
+Boolean javaVersionSupported = javaVersion == JavaVersion.VERSION_17 || 
javaVersion == JavaVersion.VERSION_21
+if (!javaVersionSupported) {
+  logger.warn("Skip Spark 4.0 build which requires JDK 17 or 21 but was 
executed with JDK " + javaVersion)
 }
 
 def sparkProjects = [
@@ -32,6 +33,9 @@ def sparkProjects = [
 ]
 
 configure(sparkProjects) {
+  tasks.configureEach {
+    onlyIf { javaVersionSupported }
+  }
   configurations {
     all {
       resolutionStrategy {

Reply via email to