Skip to content

Instantly share code, notes, and snippets.

@hpoul
Created July 28, 2020 08:26
Show Gist options
  • Save hpoul/22a8d6de09c6bac98b40bb02d178971b to your computer and use it in GitHub Desktop.
Save hpoul/22a8d6de09c6bac98b40bb02d178971b to your computer and use it in GitHub Desktop.
One liner to upgrade gradle wrapper to latest version and set sha distribution checksum.
json=$(curl -sf https://services.gradle.org/versions/current) && v=$(echo $json | jq -r '.version') && sha=$(curl -sfL $(echo $json | jq -r '.checksumUrl' | sed 's/bin/all/')) && ./gradlew wrapper --distribution-type all --gradle-distribution-sha256-sum "$sha" --gradle-version "$v"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment