org.openrewrite.gradle.search.FindGradleWrapper
Find Gradle wrappers.
GitHub, Issue Tracker, Maven Central
- groupId: org.openrewrite
- artifactId: rewrite-gradle
- version: 8.1.3
Type | Name | Description |
---|---|---|
String |
version | Optional. A version expression representing the versions to search for |
String |
versionPattern | Optional. Allows version selection to be extended beyond the original Node Semver semantics. So for example,Setting 'version' to "25-29" can be paired with a metadata pattern of "-jre" to select Guava 29.0-jre |
String |
distribution | Optional. The distribution of Gradle to find. "bin" includes Gradle binaries. "all" includes Gradle binaries, source code, and documentation. |
Parameter | Value |
---|---|
version | [6,) |
versionPattern | null |
distribution | null |
{% tabs %} {% tab title="gradle/wrapper/gradle-wrapper.properties" %}
{% code title="gradle/wrapper/gradle-wrapper.properties" %}
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
{% endcode %}
{% code title="gradle/wrapper/gradle-wrapper.properties" %}
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
~~>distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
{% endcode %}
{% endtab %} {% tab title="Diff" %} {% code %}
--- gradle/wrapper/gradle-wrapper.properties
+++ gradle/wrapper/gradle-wrapper.properties
@@ -3,1 +3,1 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip
+~~>distributionUrl=https\\://services.gradle.org/distributions/gradle-7.4-all.zip
zipStoreBase=GRADLE_USER_HOME
{% endcode %} {% endtab %} {% endtabs %}
This recipe has no required configuration parameters and comes from a rewrite core library. It can be activated directly without adding any dependencies. {% tabs %} {% tab title="Gradle" %} {% code title="build.gradle" %}
plugins {
id("org.openrewrite.rewrite") version("6.1.4")
}
rewrite {
activeRecipe("org.openrewrite.gradle.search.FindGradleWrapper")
}
repositories {
mavenCentral()
}
{% endcode %} {% endtab %}
{% endtabs %}
The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.
Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.