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

findepi 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 9a67f0b85c Drop support for Java 8 (#10518)
9a67f0b85c is described below

commit 9a67f0b85c82ae09089e150f2c663a65f145670e
Author: Piotr Findeisen <[email protected]>
AuthorDate: Fri Aug 2 09:23:23 2024 +0200

    Drop support for Java 8 (#10518)
---
 .github/workflows/delta-conversion-ci.yml |  4 +--
 .github/workflows/flink-ci.yml            |  2 +-
 .github/workflows/hive-ci.yml             |  4 +--
 .github/workflows/java-ci.yml             |  6 ++--
 .github/workflows/publish-snapshot.yml    |  2 +-
 .github/workflows/spark-ci.yml            |  2 +-
 README.md                                 |  2 +-
 build.gradle                              | 52 +++++++++++--------------------
 deploy.gradle                             |  4 +--
 hive-runtime/build.gradle                 |  2 +-
 jmh.gradle                                |  4 +--
 site/docs/contribute.md                   |  2 +-
 tasks.gradle                              |  8 ++---
 13 files changed, 38 insertions(+), 56 deletions(-)

diff --git a/.github/workflows/delta-conversion-ci.yml 
b/.github/workflows/delta-conversion-ci.yml
index ac5314e8af..cd16847cf9 100644
--- a/.github/workflows/delta-conversion-ci.yml
+++ b/.github/workflows/delta-conversion-ci.yml
@@ -71,7 +71,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     env:
       SPARK_LOCAL_IP: localhost
     steps:
@@ -100,7 +100,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     env:
       SPARK_LOCAL_IP: localhost
     steps:
diff --git a/.github/workflows/flink-ci.yml b/.github/workflows/flink-ci.yml
index d2e249c279..3df36e2be8 100644
--- a/.github/workflows/flink-ci.yml
+++ b/.github/workflows/flink-ci.yml
@@ -73,7 +73,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
         flink: ['1.17', '1.18', '1.19']
         exclude:
           # Flink 1.17 does not support Java 17.
diff --git a/.github/workflows/hive-ci.yml b/.github/workflows/hive-ci.yml
index ee487807cf..6ad9f58410 100644
--- a/.github/workflows/hive-ci.yml
+++ b/.github/workflows/hive-ci.yml
@@ -69,7 +69,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     env:
       SPARK_LOCAL_IP: localhost
     steps:
@@ -98,7 +98,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     env:
       SPARK_LOCAL_IP: localhost
     steps:
diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml
index e1fd90116e..0d39ee8646 100644
--- a/.github/workflows/java-ci.yml
+++ b/.github/workflows/java-ci.yml
@@ -65,7 +65,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     env:
       SPARK_LOCAL_IP: localhost
     steps:
@@ -94,7 +94,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     steps:
     - uses: actions/checkout@v4
     - uses: actions/setup-java@v4
@@ -107,7 +107,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
     steps:
     - uses: actions/checkout@v4
     - uses: actions/setup-java@v4
diff --git a/.github/workflows/publish-snapshot.yml 
b/.github/workflows/publish-snapshot.yml
index 411c3a5636..6acee54bde 100644
--- a/.github/workflows/publish-snapshot.yml
+++ b/.github/workflows/publish-snapshot.yml
@@ -37,7 +37,7 @@ jobs:
       - uses: actions/setup-java@v4
         with:
           distribution: zulu
-          java-version: 8
+          java-version: 11
       - run: |
           ./gradlew printVersion
           ./gradlew -DallModules publishApachePublicationToMavenRepository 
-PmavenUser=${{ secrets.NEXUS_USER }} -PmavenPassword=${{ secrets.NEXUS_PW }}
diff --git a/.github/workflows/spark-ci.yml b/.github/workflows/spark-ci.yml
index 7a47beeed7..1cc0425b73 100644
--- a/.github/workflows/spark-ci.yml
+++ b/.github/workflows/spark-ci.yml
@@ -71,7 +71,7 @@ jobs:
     runs-on: ubuntu-22.04
     strategy:
       matrix:
-        jvm: [8, 11, 17, 21]
+        jvm: [11, 17, 21]
         spark: ['3.3', '3.4', '3.5']
         scala: ['2.12', '2.13']
         exclude:
diff --git a/README.md b/README.md
index fe0d2b94c3..7d20560778 100644
--- a/README.md
+++ b/README.md
@@ -51,7 +51,7 @@ Community discussions happen primarily on the [dev mailing 
list][dev-list] or on
 
 ### Building
 
-Iceberg is built using Gradle with Java 8, 11, 17, or 21.
+Iceberg is built using Gradle with Java 11, 17, or 21.
 
 * To invoke a build and run tests: `./gradlew build`
 * To skip tests: `./gradlew build -x test -x integrationTest`
diff --git a/build.gradle b/build.gradle
index a0b1a2e018..450a92f24b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -56,10 +56,7 @@ try {
   project.logger.error(e.getMessage())
 }
 
-if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
-  project.ext.jdkVersion = '8'
-  project.ext.extraJvmArgs = []
-} else if (JavaVersion.current() == JavaVersion.VERSION_11) {
+if (JavaVersion.current() == JavaVersion.VERSION_11) {
   project.ext.jdkVersion = '11'
   project.ext.extraJvmArgs = []
 } else if (JavaVersion.current() == JavaVersion.VERSION_17 || 
JavaVersion.current() == JavaVersion.VERSION_21) {
@@ -86,7 +83,7 @@ if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
                               "--add-opens", 
"java.base/sun.security.action=ALL-UNNAMED",
                               "--add-opens", 
"java.base/sun.util.calendar=ALL-UNNAMED"]
 } else {
-  throw new GradleException("This build must be run with JDK 8 or 11 or 17 or 
21 but was executed with JDK " + JavaVersion.current())
+  throw new GradleException("This build must be run with JDK 11 or 17 or 21 
but was executed with JDK " + JavaVersion.current())
 }
 
 tasks.withType(AbstractArchiveTask).configureEach {
@@ -887,23 +884,12 @@ project(':iceberg-pig') {
 }
 
 project(':iceberg-nessie') {
-  if (JavaVersion.current().isJava11Compatible()) {
-    test {
-      useJUnitPlatform()
-    }
-    compileTestJava {
-      sourceCompatibility = "11"
-      targetCompatibility = "11"
-    }
-  } else {
-    // Do not test Nessie against Java 8, because in-JVM testing requires 
Nessie server components,
-    // which require Java 11+.
-    test {
-      enabled = false
-    }
-    compileTestJava {
-      enabled = false
-    }
+  test {
+    useJUnitPlatform()
+  }
+  compileTestJava {
+    sourceCompatibility = "11"
+    targetCompatibility = "11"
   }
 
   dependencies {
@@ -922,21 +908,19 @@ project(':iceberg-nessie') {
     // Only there to prevent "warning: unknown enum constant 
SchemaType.OBJECT" compile messages
     compileOnly libs.microprofile.openapi.api
 
-    if (JavaVersion.current().isJava11Compatible()) {
-      testImplementation libs.nessie.jaxrs.testextension
-      testImplementation libs.nessie.versioned.storage.inmemory.tests
-      testImplementation libs.nessie.versioned.storage.testextension
-      // Need to "pull in" el-api explicitly :(
-      testImplementation libs.jakarta.el.api
+    testImplementation libs.nessie.jaxrs.testextension
+    testImplementation libs.nessie.versioned.storage.inmemory.tests
+    testImplementation libs.nessie.versioned.storage.testextension
+    // Need to "pull in" el-api explicitly :(
+    testImplementation libs.jakarta.el.api
 
-      testImplementation libs.avro.avro
+    testImplementation libs.avro.avro
 
-      testImplementation project(path: ':iceberg-api', configuration: 
'testArtifacts')
-      testImplementation project(path: ':iceberg-core', configuration: 
'testArtifacts')
+    testImplementation project(path: ':iceberg-api', configuration: 
'testArtifacts')
+    testImplementation project(path: ':iceberg-core', configuration: 
'testArtifacts')
 
-      // Only there to prevent "warning: unknown enum constant 
SchemaType.OBJECT" compile messages
-      testCompileOnly libs.microprofile.openapi.api
-    }
+    // Only there to prevent "warning: unknown enum constant 
SchemaType.OBJECT" compile messages
+    testCompileOnly libs.microprofile.openapi.api
   }
 }
 
diff --git a/deploy.gradle b/deploy.gradle
index 3e2eda2a5a..4624483032 100644
--- a/deploy.gradle
+++ b/deploy.gradle
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-if (project.hasProperty('release') && jdkVersion != '8') {
-  throw new GradleException("Releases must be built with Java 8")
+if (project.hasProperty('release') && jdkVersion != '11') {
+  throw new GradleException("Releases must be built with Java 11")
 }
 
 subprojects {
diff --git a/hive-runtime/build.gradle b/hive-runtime/build.gradle
index b2051d5295..6f891be808 100644
--- a/hive-runtime/build.gradle
+++ b/hive-runtime/build.gradle
@@ -38,7 +38,7 @@ project(':iceberg-hive-runtime') {
 
   dependencies {
     implementation project(':iceberg-mr')
-    if (jdkVersion == '8' && hiveVersions.contains("3")) {
+    if (hiveVersions.contains("3")) {
       implementation project(':iceberg-hive3')
     }
     implementation(project(':iceberg-nessie')) {
diff --git a/jmh.gradle b/jmh.gradle
index 80f5f8d0ea..5e5e015121 100644
--- a/jmh.gradle
+++ b/jmh.gradle
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-if (jdkVersion != '8' && jdkVersion != '11' && jdkVersion != '17' && 
jdkVersion != '21') {
-  throw new GradleException("The JMH benchmarks must be run with JDK 8 or JDK 
11 or JDK 17 or JDK 21")
+if (jdkVersion != '11' && jdkVersion != '17' && jdkVersion != '21') {
+  throw new GradleException("The JMH benchmarks must be run with JDK 11 or JDK 
17 or JDK 21")
 }
 
 def flinkVersions = (System.getProperty("flinkVersions") != null ? 
System.getProperty("flinkVersions") : 
System.getProperty("defaultFlinkVersions")).split(",")
diff --git a/site/docs/contribute.md b/site/docs/contribute.md
index 88a14e7153..60bc89f953 100644
--- a/site/docs/contribute.md
+++ b/site/docs/contribute.md
@@ -84,7 +84,7 @@ settle disagreements or to force a decision.
 
 ## Building the Project Locally
 
-Iceberg is built using Gradle with Java 8, 11, 17, or 21.
+Iceberg is built using Gradle with Java 11, 17, or 21.
 
 * To invoke a build and run tests: `./gradlew build`
 * To skip tests: `./gradlew build -x test -x integrationTest`
diff --git a/tasks.gradle b/tasks.gradle
index 5fc24d41ae..5515d7b750 100644
--- a/tasks.gradle
+++ b/tasks.gradle
@@ -32,11 +32,9 @@ task aggregateJavadoc(type: Javadoc) {
 
   doLast {
     // Fix bug with search
-    if (JavaVersion.current() >= JavaVersion.VERSION_11) {
-      // Append the fix to the file
-      def searchScript = new File("site/docs/javadoc/${getJavadocVersion()}" + 
'/search.js')
-      searchScript.append JAVADOC_FIX_SEARCH_STR
-    }
+    // Append the fix to the file
+    def searchScript = new File("site/docs/javadoc/${getJavadocVersion()}" + 
'/search.js')
+    searchScript.append JAVADOC_FIX_SEARCH_STR
   }
 }
 

Reply via email to