Add the Gradle distribution SHA-256 checksum
MSALPin the SHA-256 checksum of the Gradle distribution the wrapper already downloads, by adding distributionSha256Sum to gradle/wrapper/gradle-wrapper.properties when it is absent. Without it the wrapper runs whatever the distribution URL happens to serve. The sum is fetched from the distribution URL with .sha256 appended, which is how Gradle publishes it, so distributionUrl is left exactly as it is and the Gradle version does not change. org.openrewrite.gradle.UpdateGradleWrapper also pins the sum, but as part of moving the wrapper to the version it resolves; use this recipe to pin the version already in the file. See the Gradle best practice.
org. openrewrite. gradle. migrate. wrapper. AddGradleWrapperChecksummod run . --recipe= org. openrewrite. gradle. migrate. wrapper. AddGradleWrapperChecksumInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.