3

This is my gradle-wrapper.properties .

gradle#Wed Jul 25 11:42:23 IST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

I need to add line similar to this :-

distributionSha256Sum=7a2c66d1a78f811d5f37d14630ad21cec5e77a2a4dc61e787e2257a6341016ce

How can we add distributionSha256Sum to gradle-wrapper.properties ?

why gradle/wrapper/gradle.properties is missing distributionSha256Sum is considered as a Security Issue ? I am using latest Android Studio on Ubuntu 16.04.

anoopknr
  • 3,177
  • 2
  • 23
  • 33
  • 4
    "How can we add distributionSha256Sum to gradle-wrapper.properties ?" -- just put it on another line in the file, as shown in [the docs](https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper). However, Android Studio used to crash when the SHA-256 hash did not match the ZIP file, rather than show an error. "why gradle/wrapper/gradle.properties is missing distributionSha256Sum is considered as a Security Issue ?" -- I asked Google [nearly two years ago](https://issuetracker.google.com/issues/37126714) to support it. – CommonsWare Jul 28 '18 at 12:35
  • 1
    @CommonsWare How could I get perfect sha256sum ? – anoopknr Jul 28 '18 at 12:38
  • 3
    You could download it, as shown in [the docs](https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper). – CommonsWare Jul 28 '18 at 12:38
  • @CommonsWare which file i need to download from [docs](https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper) to which folder? – SL5net Jun 16 '20 at 02:57
  • The docs changed a bit in the past two years. [This sub-section](https://docs.gradle.org/current/userguide/gradle_wrapper.html#configuring_checksum_verification) is what I was referring to. You can find the value to use from [the distribution downloads](https://services.gradle.org/distributions/) and finding the value in the `.sha256` file corresponding with your version. Note that using this will still crash Android Studio, but 4.1 or 4.2 may soon support `distributionSha256Sum`. – CommonsWare Jun 16 '20 at 10:55

1 Answers1

1
Just click the 2nd option and you are good to go ;)

https://github.com/SecUSo/privacy-friendly-ludo/issues/14

Joshua
  • 689
  • 7
  • 16