THRIFT-5699: java lib and build tool chain: gradle 8.0.2 (#2779)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ac5f419..caeaf16 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -137,7 +137,7 @@
needs: compiler
runs-on: ubuntu-20.04
env:
- GRADLE_VERSION: "7.6"
+ GRADLE_VERSION: "8.0.2"
steps:
- uses: actions/checkout@v3
@@ -156,7 +156,7 @@
- name: Setup gradle
run: |
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip
- (echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
+ (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -)
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
sudo mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
sudo ln -s /usr/local/gradle/bin/gradle /usr/local/bin
@@ -431,7 +431,7 @@
- uses: actions/setup-java@v3
with:
distribution: temurin
- # here we intentionally use an older version so that we also verify java 17 compiles to it
+ # here we intentionally use an older version so that we also verify Java 17 compiles to it
java-version: 11
cache: "gradle"
diff --git a/build/docker/old/ubuntu-disco/Dockerfile b/build/docker/old/ubuntu-disco/Dockerfile
index 78caf5d..55dc853 100644
--- a/build/docker/old/ubuntu-disco/Dockerfile
+++ b/build/docker/old/ubuntu-disco/Dockerfile
@@ -160,7 +160,7 @@
haxelib setup --always /usr/share/haxe/lib && \
haxelib install --always hxcpp 2>&1 > /dev/null
-ENV GRADLE_VERSION="7.6"
+ENV GRADLE_VERSION="8.0.2"
RUN apt-get install -y --no-install-recommends \
`# Java dependencies` \
ant \
@@ -169,7 +169,7 @@
openjdk-11-jdk-headless && \
`# Gradle` \
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip && \
- (echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
+ (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip && \
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle && \
ln -s /usr/local/gradle/bin/gradle /usr/local/bin
diff --git a/build/docker/old/ubuntu-xenial/Dockerfile b/build/docker/old/ubuntu-xenial/Dockerfile
index 63140ac..64d4804 100644
--- a/build/docker/old/ubuntu-xenial/Dockerfile
+++ b/build/docker/old/ubuntu-xenial/Dockerfile
@@ -155,7 +155,7 @@
haxelib install --always hxcpp 3.4.64 2>&1 > /dev/null
# note: hxcpp 3.4.185 (latest) no longer ships static libraries, and caused a build failure
-ENV GRADLE_VERSION="7.6"
+ENV GRADLE_VERSION="8.0.2"
RUN apt-get install -y --no-install-recommends \
`# Java dependencies` \
ant \
@@ -165,7 +165,7 @@
unzip && \
`# Gradle` \
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip && \
- (echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
+ (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip && \
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle && \
ln -s /usr/local/gradle/bin/gradle /usr/local/bin
diff --git a/build/docker/ubuntu-bionic/Dockerfile b/build/docker/ubuntu-bionic/Dockerfile
index 3330344..d6d2bda 100644
--- a/build/docker/ubuntu-bionic/Dockerfile
+++ b/build/docker/ubuntu-bionic/Dockerfile
@@ -161,7 +161,7 @@
haxelib setup --always /usr/share/haxe/lib && \
haxelib install --always hxcpp 2>&1 > /dev/null
-ENV GRADLE_VERSION="7.6"
+ENV GRADLE_VERSION="8.0.2"
RUN apt-get install -y --no-install-recommends \
`# Java dependencies` \
ant \
@@ -170,7 +170,7 @@
openjdk-17-jdk-headless && \
`# Gradle` \
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip && \
- (echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
+ (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip && \
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle && \
ln -s /usr/local/gradle/bin/gradle /usr/local/bin
diff --git a/build/docker/ubuntu-focal/Dockerfile b/build/docker/ubuntu-focal/Dockerfile
index 36bd043..1f30573 100644
--- a/build/docker/ubuntu-focal/Dockerfile
+++ b/build/docker/ubuntu-focal/Dockerfile
@@ -162,7 +162,7 @@
haxelib setup --always /usr/share/haxe/lib && \
haxelib install --always hxcpp 2>&1 > /dev/null
-ENV GRADLE_VERSION="7.6"
+ENV GRADLE_VERSION="8.0.2"
RUN apt-get install -y --no-install-recommends \
`# Java dependencies` \
ant \
@@ -171,7 +171,7 @@
openjdk-17-jdk-headless && \
`# Gradle` \
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip && \
- (echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
+ (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip && \
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle && \
ln -s /usr/local/gradle/bin/gradle /usr/local/bin
diff --git a/build/docker/ubuntu-jammy/Dockerfile b/build/docker/ubuntu-jammy/Dockerfile
index 7cbc4a0..c7724e7 100644
--- a/build/docker/ubuntu-jammy/Dockerfile
+++ b/build/docker/ubuntu-jammy/Dockerfile
@@ -162,7 +162,7 @@
haxelib setup --always /usr/share/haxe/lib && \
haxelib install --always hxcpp 2>&1 > /dev/null
-ENV GRADLE_VERSION="7.6"
+ENV GRADLE_VERSION="8.0.2"
RUN apt-get install -y --no-install-recommends \
`# Java dependencies` \
ant \
@@ -171,7 +171,7 @@
openjdk-11-jdk-headless && \
`# Gradle` \
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip && \
- (echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
+ (echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -) && \
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip && \
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle && \
ln -s /usr/local/gradle/bin/gradle /usr/local/bin
diff --git a/doc/install/README.md b/doc/install/README.md
index 2a9446b..b90e5c6 100644
--- a/doc/install/README.md
+++ b/doc/install/README.md
@@ -28,8 +28,8 @@
* zlib (optional)
* Qt (optional)
* Java
- * Java 17
- * Gradle 7.6
+ * Java 17 (latest LTS)
+ * Gradle 8.0.2
* C#: Mono 1.2.4 (and pkg-config to detect it) or Visual Studio 2005+
* Python 2.6 (including header files for extension modules)
* PHP 5.0 (optionally including header files for extension modules)
diff --git a/doc/install/debian.md b/doc/install/debian.md
index 281a6a8..4718017 100644
--- a/doc/install/debian.md
+++ b/doc/install/debian.md
@@ -18,7 +18,7 @@
If you would like to build Apache Thrift libraries for other programming languages you may need to install additional packages. The following languages require the specified additional packages:
* Java
- * packages: gradle (version 7.6)
+ * packages: gradle (version 8.0.2)
* You will also need Java JDK v1.8 or higher. Type **javac** to see a list of available packages, pick the one you prefer and **apt-get install** it (e.g. default-jdk).
* Ruby
* ruby-full ruby-dev ruby-rspec rake rubygems bundler
diff --git a/lib/java/README.md b/lib/java/README.md
index 956d043..aa07495 100644
--- a/lib/java/README.md
+++ b/lib/java/README.md
@@ -42,7 +42,7 @@
the Gradle build system, which tends to be predominant amongst Java
developers.
-Currently we use gradle 7.6 to build the Thrift Java source. The usual way to setup gradle
+Currently we use gradle 8.0 to build the Thrift Java source. The usual way to setup gradle
project is to include the gradle-wrapper.jar in the project and then run the gradle wrapper to
bootstrap setting up gradle binaries. However to avoid putting binary files into the source tree we
have ignored the gradle wrapper files. You are expected to install it manually, as described in
@@ -50,13 +50,13 @@
following this step (which is also done in the travis CI docker images):
```bash
-export GRADLE_VERSION="7.6"
+export GRADLE_VERSION="8.0.2"
# install dependencies
apt-get install -y --no-install-recommends openjdk-17-jdk-headless wget unzip
# download gradle distribution
wget https://services.gradle.org/distributions/gradle-$GRADLE_VERSION-bin.zip -q -O /tmp/gradle-$GRADLE_VERSION-bin.zip
# check binary integrity
-echo "7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -
+echo "ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 /tmp/gradle-$GRADLE_VERSION-bin.zip" | sha256sum -c -
# unzip and install
unzip -d /tmp /tmp/gradle-$GRADLE_VERSION-bin.zip
mv /tmp/gradle-$GRADLE_VERSION /usr/local/gradle
diff --git a/lib/java/build.gradle b/lib/java/build.gradle
index c8fc27c..7459e1f 100644
--- a/lib/java/build.gradle
+++ b/lib/java/build.gradle
@@ -40,7 +40,7 @@
id 'maven-publish'
id 'signing'
id 'pmd'
- id 'com.github.johnrengelman.shadow' version '6.1.0'
+ id 'com.github.johnrengelman.shadow' version '8.1.1'
id "com.github.spotbugs" version "4.7.1"
id "com.diffplug.spotless" version "6.5.2"
}
diff --git a/lib/java/gradle/sourceConfiguration.gradle b/lib/java/gradle/sourceConfiguration.gradle
index 7eccc73..e3e143a 100644
--- a/lib/java/gradle/sourceConfiguration.gradle
+++ b/lib/java/gradle/sourceConfiguration.gradle
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------------------
// Compiler configuration details
-// We are using Java 17 toolchain to compile.
+// We are using Java 17 (latest LTS) toolchain to compile.
// This enables decoupling from the Java version that gradle runs, from
// the actual JDK version for the project. For more details, see
// https://docs.gradle.org/current/userguide/toolchains.html
diff --git a/lib/java/gradle/unitTests.gradle b/lib/java/gradle/unitTests.gradle
index 293bcca..1e7481b 100644
--- a/lib/java/gradle/unitTests.gradle
+++ b/lib/java/gradle/unitTests.gradle
@@ -24,7 +24,7 @@
description = 'Assembles a jar archive containing the test classes.'
project.test.dependsOn it
- classifier 'test'
+ archiveClassifier = 'test'
from sourceSets.test.output
}