diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-01-05 21:00:58 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-01-06 09:06:36 +0000 |
commit | d6c54b3d4ee757958f9040a84dfbde0ab25f59bf (patch) | |
tree | 5e943e78cabc5ace24d6efdafcfc3d8136b3881f | |
parent | 4a0dc0d63a204f7ed03b48debd439e0e81f1dfac (diff) |
android: Enable checksum verification for gradle download
Follow the F-Droid Bot suggestion in [1] and set the checksum
from [2] in gradle-wrapper.properties, so a downloaded gradle
distribution will be verified against that, s. doc at [3].
Command used from within the `android/source` directory:
./gradlew wrapper --distribution-type all --gradle-distribution-sha256-sum cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0
Note that this is the checksum for the gradle distribution,
not the gradle wrapper (which is mentioned in
Change-Id I3f466061aba55c5704fe251eee7e8c73f7d316aa instead.)
Also note that Android Studio does not fully support
the "distributionSha256Sum" attribute and requires
confirming in a message saying so that the checksum is correct
before syncing the project, s. [4].
[1] https://gitlab.com/fdroid/fdroiddata/-/merge_requests/12380#note_1229239229
[2] https://downloads.gradle-dn.com/distributions/gradle-7.4-all.zip.sha256
[3] https://docs.gradle.org/current/userguide/gradle_wrapper.html#configuring_checksum_verification
[4] https://issuetracker.google.com/issues/129261435#comment11
Change-Id: I39902be79e7dad2ad006262efe3b6c6ab3b5de5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145105
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | android/source/gradle/wrapper/gradle-wrapper.properties | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/android/source/gradle/wrapper/gradle-wrapper.properties b/android/source/gradle/wrapper/gradle-wrapper.properties index b1159fc54f39..dcf5e2cb7b3e 100644 --- a/android/source/gradle/wrapper/gradle-wrapper.properties +++ b/android/source/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionSha256Sum=cd5c2958a107ee7f0722004a12d0f8559b4564c34daad7df06cffd4d12a426d0 distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists |