You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by fo...@apache.org on 2023/02/22 08:54:24 UTC

[iceberg] branch master updated: Build: Bump Gradle to 8.0.1 (#6826)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2403067441 Build: Bump Gradle to 8.0.1 (#6826)
2403067441 is described below

commit 240306744197a9d1c60763a97ae95904a279a0b5
Author: Robert Stupp <sn...@snazy.de>
AuthorDate: Wed Feb 22 09:54:15 2023 +0100

    Build: Bump Gradle to 8.0.1 (#6826)
---
 build.gradle                             | 25 +++++++++++++++++++++----
 deploy.gradle                            |  6 +++---
 flink/v1.14/build.gradle                 |  2 +-
 flink/v1.15/build.gradle                 |  2 +-
 flink/v1.16/build.gradle                 |  2 +-
 gradle/wrapper/gradle-wrapper.properties |  5 +++--
 gradlew                                  |  8 ++++++--
 hive-runtime/build.gradle                |  2 +-
 hive3-orc-bundle/build.gradle            |  2 +-
 spark/v2.4/build.gradle                  |  2 +-
 spark/v3.1/build.gradle                  |  2 +-
 spark/v3.2/build.gradle                  |  2 +-
 spark/v3.3/build.gradle                  |  2 +-
 13 files changed, 42 insertions(+), 20 deletions(-)

diff --git a/build.gradle b/build.gradle
index 9513a916e1..1e80af02a7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -28,6 +28,11 @@ buildscript {
   dependencies {
     classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
     classpath 'com.palantir.baseline:gradle-baseline-java:4.42.0'
+    // com.palantir.baseline:gradle-baseline-java:4.42.0 (the last version supporting Java 8) pulls
+    // in an old version of the errorprone, which doesn't work w/ Gradle 8, so bump errorpone as
+    // well.
+    classpath "net.ltgt.gradle:gradle-errorprone-plugin:3.0.1"
+
     classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.13.0'
     classpath 'gradle.plugin.org.inferred:gradle-processors:3.7.0'
     classpath 'me.champeau.jmh:jmh-gradle-plugin:0.6.8'
@@ -36,10 +41,12 @@ buildscript {
     classpath 'com.palantir.gradle.revapi:gradle-revapi:1.7.0'
     classpath 'com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.1'
     classpath 'com.palantir.gradle.gitversion:gradle-git-version:1.0.0'
-    classpath ('org.eclipse.jgit:org.eclipse.jgit:5.13.1.202206130422-r') {
+    classpath ('org.eclipse.jgit:org.eclipse.jgit') {
       // gradle-git-version automatically uses a jgit version that requires JDK11
       // so we need to enforce the latest jgit version that works with JDK8
-      force = true
+      version {
+        strictly('5.13.1.202206130422-r')
+      }
     }
   }
 }
@@ -219,7 +226,7 @@ project(':iceberg-bundled-guava') {
   }
 
   shadowJar {
-    classifier null
+    archiveClassifier.set(null)
     configurations = [project.configurations.compileClasspath]
     zip64 true
 
@@ -241,7 +248,7 @@ project(':iceberg-bundled-guava') {
   }
 
   jar {
-    archiveClassifier = 'empty'
+    archiveClassifier.set('empty')
   }
 }
 
@@ -257,6 +264,16 @@ project(':iceberg-api') {
 
   tasks.processTestResources.dependsOn rootProject.tasks.buildInfo
 
+  // Workaround to prevent:
+  // Task ':iceberg-api:processTestResources' uses this output of task
+  // ':spotlessInternalRegisterDependencies' without declaring an explicit or implicit dependency.
+  // This can lead to incorrect results being produced, depending on what order the tasks are executed.
+  rootProject.tasks.configureEach { rootTask ->
+    if (rootTask.name == 'spotlessInternalRegisterDependencies') {
+      tasks.processTestResources.dependsOn rootTask
+    }
+  }
+
   sourceSets {
     test {
       resources {
diff --git a/deploy.gradle b/deploy.gradle
index 8e0d43fe02..2e824b06bd 100644
--- a/deploy.gradle
+++ b/deploy.gradle
@@ -27,19 +27,19 @@ subprojects {
   afterEvaluate {
 
     task sourceJar(type: Jar, dependsOn: classes) {
-      classifier = 'sources'
+      archiveClassifier.set('sources')
       from sourceSets.main.allSource
       group 'build'
     }
 
     task javadocJar(type: Jar, dependsOn: javadoc) {
-      classifier = 'javadoc'
+      archiveClassifier.set('javadoc')
       from javadoc.destinationDir
       group 'build'
     }
 
     task testJar(type: Jar) {
-      archiveClassifier = 'tests'
+      archiveClassifier.set('tests')
       from sourceSets.test.output
     }
 
diff --git a/flink/v1.14/build.gradle b/flink/v1.14/build.gradle
index 66e3708ce5..0d7e8b83aa 100644
--- a/flink/v1.14/build.gradle
+++ b/flink/v1.14/build.gradle
@@ -230,7 +230,7 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.apache.httpcomponents.client5', 'org.apache.iceberg.shaded.org.apache.httpcomponents.client5'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   task integrationTest(type: Test) {
diff --git a/flink/v1.15/build.gradle b/flink/v1.15/build.gradle
index 36758b147d..c516612c85 100644
--- a/flink/v1.15/build.gradle
+++ b/flink/v1.15/build.gradle
@@ -232,7 +232,7 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.apache.httpcomponents.client5', 'org.apache.iceberg.shaded.org.apache.httpcomponents.client5'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   task integrationTest(type: Test) {
diff --git a/flink/v1.16/build.gradle b/flink/v1.16/build.gradle
index cca69dc99a..0f3ad21488 100644
--- a/flink/v1.16/build.gradle
+++ b/flink/v1.16/build.gradle
@@ -232,7 +232,7 @@ project(":iceberg-flink:iceberg-flink-runtime-${flinkMajorVersion}") {
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.apache.httpcomponents.client5', 'org.apache.iceberg.shaded.org.apache.httpcomponents.client5'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   task integrationTest(type: Test) {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 9e751de239..d95e58d931 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,8 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 # checksum was taken from https://gradle.org/release-checksums
-distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
+distributionSha256Sum=1b6b558be93f29438d3df94b7dfee02e794b94d9aca4611a92cdb79b6b88e909
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
+networkTimeout=10000
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index f9f74b8e1d..738aa72505 100755
--- a/gradlew
+++ b/gradlew
@@ -55,7 +55,7 @@
 #       Darwin, MinGW, and NonStop.
 #
 #   (3) This script is generated from the Groovy template
-#       https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+#       https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
 #       within the Gradle project.
 #
 #       You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,7 +83,7 @@ done
 APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
 
 if [ ! -e $APP_HOME/gradle/wrapper/gradle-wrapper.jar ]; then
-    curl -o $APP_HOME/gradle/wrapper/gradle-wrapper.jar https://raw.githubusercontent.com/gradle/gradle/v7.6.0/gradle/wrapper/gradle-wrapper.jar
+    curl -o $APP_HOME/gradle/wrapper/gradle-wrapper.jar https://raw.githubusercontent.com/gradle/gradle/v8.0.0/gradle/wrapper/gradle-wrapper.jar
 fi
 
 APP_NAME="Gradle"
@@ -147,12 +147,16 @@ fi
 if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
     case $MAX_FD in #(
       max*)
+        # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC3045
         MAX_FD=$( ulimit -H -n ) ||
             warn "Could not query maximum file descriptor limit"
     esac
     case $MAX_FD in  #(
       '' | soft) :;; #(
       *)
+        # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+        # shellcheck disable=SC3045
         ulimit -n "$MAX_FD" ||
             warn "Could not set maximum file descriptor limit to $MAX_FD"
     esac
diff --git a/hive-runtime/build.gradle b/hive-runtime/build.gradle
index 7e30c3f108..8d0689a104 100644
--- a/hive-runtime/build.gradle
+++ b/hive-runtime/build.gradle
@@ -78,7 +78,7 @@ project(':iceberg-hive-runtime') {
     // relocate OrcSplit in order to avoid the conflict from Hive's OrcSplit
     relocate 'org.apache.hadoop.hive.ql.io.orc.OrcSplit', 'org.apache.iceberg.shaded.org.apache.hadoop.hive.ql.io.orc.OrcSplit'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   jar {
diff --git a/hive3-orc-bundle/build.gradle b/hive3-orc-bundle/build.gradle
index b21593c369..2b83e77968 100644
--- a/hive3-orc-bundle/build.gradle
+++ b/hive3-orc-bundle/build.gradle
@@ -74,7 +74,7 @@ project(':iceberg-hive3-orc-bundle') {
       exclude 'shaded/parquet/**/*'
     }
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   jar {
diff --git a/spark/v2.4/build.gradle b/spark/v2.4/build.gradle
index 5cb23467a3..20599c9a9c 100644
--- a/spark/v2.4/build.gradle
+++ b/spark/v2.4/build.gradle
@@ -175,7 +175,7 @@ project(':iceberg-spark:iceberg-spark-runtime-2.4') {
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   jar {
diff --git a/spark/v3.1/build.gradle b/spark/v3.1/build.gradle
index c7861d36e5..bfb73ab9f2 100644
--- a/spark/v3.1/build.gradle
+++ b/spark/v3.1/build.gradle
@@ -261,7 +261,7 @@ project(':iceberg-spark:iceberg-spark-runtime-3.1_2.12') {
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   task integrationTest(type: Test) {
diff --git a/spark/v3.2/build.gradle b/spark/v3.2/build.gradle
index d59a1907d8..2b57f49075 100644
--- a/spark/v3.2/build.gradle
+++ b/spark/v3.2/build.gradle
@@ -266,7 +266,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   task integrationTest(type: Test) {
diff --git a/spark/v3.3/build.gradle b/spark/v3.3/build.gradle
index 3f7cf71b74..349b4f2192 100644
--- a/spark/v3.3/build.gradle
+++ b/spark/v3.3/build.gradle
@@ -265,7 +265,7 @@ project(":iceberg-spark:iceberg-spark-runtime-${sparkMajorVersion}_${scalaVersio
     relocate 'org.threeten.extra', 'org.apache.iceberg.shaded.org.threeten.extra'
     relocate 'org.roaringbitmap', 'org.apache.iceberg.shaded.org.roaringbitmap'
 
-    classifier null
+    archiveClassifier.set(null)
   }
 
   task integrationTest(type: Test) {