[Android] Use gradle 8.2 for 4.0 from the Gradle servers

Steve Lhomme git at videolan.org
Mon Jul 10 10:13:17 UTC 2023


vlc-android | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun 16 08:04:01 2023 +0200| [fae8d1f0c58a32ed7410abc710c9a526ba155182] | committer: Nicolas Pomepuy

Use gradle 8.2 for 4.0 from the Gradle servers

And check the hash of the gradle download. We don't want man in the
middle attacks.

> https://code.videolan.org/videolan/vlc-android/commit/fae8d1f0c58a32ed7410abc710c9a526ba155182
---

 buildsystem/compile.sh            | 6 ++++--
 buildsystem/gitlab/.gitlab-ci.yml | 6 +-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index af267d9980..b8025f3c85 100755
--- a/buildsystem/compile.sh
+++ b/buildsystem/compile.sh
@@ -240,9 +240,11 @@ fi
 
 if [ ! -d "gradle/wrapper" ]; then
     diagnostic "Downloading gradle"
-    GRADLE_VERSION=8.0
-    GRADLE_URL=https://download.videolan.org/pub/contrib/gradle/gradle-${GRADLE_VERSION}-bin.zip
+    GRADLE_VERSION=8.2
+    GRADLE_SHA256=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
+    GRADLE_URL=https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip
     wget ${GRADLE_URL} 2>/dev/null || curl -O ${GRADLE_URL} || fail "gradle: download failed"
+    echo $GRADLE_SHA256 gradle-${GRADLE_VERSION}-bin.zip | sha256sum -c || fail "gradle: hash mismatch"
 
     unzip -o gradle-${GRADLE_VERSION}-bin.zip || fail "gradle: unzip failed"
 
diff --git a/buildsystem/gitlab/.gitlab-ci.yml b/buildsystem/gitlab/.gitlab-ci.yml
index 086261dcf9..b0f9771f96 100644
--- a/buildsystem/gitlab/.gitlab-ci.yml
+++ b/buildsystem/gitlab/.gitlab-ci.yml
@@ -1,11 +1,7 @@
 cache:
     paths:
         - .gradle/
-        - gradle-7.2/
-        - gradle-7.3.3/
-        - gradle-7.4/
-        - gradle-7.5/
-        - gradle-8.0/
+        - gradle-8.2/
         - gradle/
         - gradlew
 



More information about the Android mailing list