Update Gradle wrapper
Apache 2.0Update the version of Gradle used in an existing Gradle wrapper. Queries services.gradle.org to determine the available releases, but prefers the artifact repository URL which already exists within the wrapper properties file. If your artifact repository does not contain the same Gradle distributions as services.gradle.org, then the recipe may suggest a version which is not available in your artifact repository.
org. openrewrite. gradle. UpdateGradleWrapperOptional
An exact version number or node-style semver selector used to select the version number. Defaults to the latest release available from services.gradle.org if not specified.
The distribution of Gradle to use. "bin" includes Gradle binaries. "all" includes Gradle binaries, source code, and documentation. Defaults to the distribution type of the existing wrapper properties file, or "bin" if no wrapper properties file exists.
Add a Gradle wrapper, if it's missing. Defaults to true.
The URI of the Gradle wrapper distribution. Specifies a custom location from which to download the Gradle wrapper scripts (gradlew, gradlew.bat, etc.). This is useful for setting up the Gradle wrapper without relying on Gradle's official distribution services.
When this option is set, the version field must not be specified, and the distribution field, if specified, must match the distribution type in the URI. The URI should point to a valid and reachable Gradle wrapper distribution (typically a .zip archive containing the wrapper files). This is particularly helpful in environments where access to Gradle's central services is restricted or where custom Gradle wrapper setups are required. If the URI is inaccessible, the recipe will leave the existing wrapper files in the repository unchanged, as they are generally compatible with various Gradle versions.
The SHA-256 checksum of the Gradle distribution. If specified, the recipe will add the checksum along with the custom distribution URL.
mod run . --recipe= org. openrewrite. gradle. UpdateGradleWrapperInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.