Issue
Gradle Manual (1) suggests to verify Gradle Wrapper Jar against officially published release checksums (2). When generating with gradle wrapper
command and gradle being installed via apt-get install gradle
resulting wrapper Jar's checksum doesn't match any from (2).
Checked on Ubuntu 19.10, 18.04.3.
Solution
Many Linux distributions build their own distribution of Gradle, though I have no idea why. I assume this is the case for Ubuntu. And when you use a custom built distribution, it is not unreasonable to see why the checksum might end up different than the official ones.
You should only use a locally installed distribution for the first time you initialize a Gradle project. So I expect this problem will go away once you change the version for the project. For example, assume you are on a custom version 6.0 now, and you run gradlew wrapper --gradle-version 6.0.1 --distribution-type all
twice in a row* (notice the 'w'), then it will update your project distribution of Gradle to a newer and official version. I would be surprised if the checksum didn't match after that.
Alternatively, you could also download the wrapper jar manually.
*) It is good practice to run the wrapper script twice as the wrapper scripts themselves are only updated on the second run once the newer version has been downloaded.
Answered By - Bjørn Vester