Package org.openrewrite.gradle.util
Class GradleWrapper
java.lang.Object
org.openrewrite.gradle.util.GradleWrapper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GradleWrappercreate(@Nullable String currentDistributionUrl, @Nullable String distributionTypeName, @Nullable String version, org.openrewrite.ExecutionContext ctx) static GradleWrappercreate(@Nullable String distributionTypeName, @Nullable String version, org.openrewrite.ExecutionContext ctx) Construct a Gradle wrapper from a distribution type and version.static GradleWrapperConstruct a Gradle wrapper from a URI.@Nullable org.openrewrite.Checksumorg.openrewrite.remote.RemoteResourcegradlew()org.openrewrite.remote.RemoteResourcestatic List<GradleWrapper.GradleVersion> listAllPublicVersions(org.openrewrite.ExecutionContext ctx) static @Nullable StringversionFromDistributionUrl(String distributionUrl) The Gradle version a wrapper declares, read from thedistributionUrlit points at.org.openrewrite.remote.RemoteArchiveorg.openrewrite.remote.RemoteArchivewrapperJar(org.openrewrite.SourceFile before)
-
Field Details
-
WRAPPER_JAR_LOCATION_RELATIVE_PATH
- See Also:
-
WRAPPER_PROPERTIES_LOCATION_RELATIVE_PATH
- See Also:
-
WRAPPER_SCRIPT_LOCATION_RELATIVE_PATH
- See Also:
-
WRAPPER_BATCH_LOCATION_RELATIVE_PATH
- See Also:
-
WRAPPER_JAR_LOCATION
-
WRAPPER_PROPERTIES_LOCATION
-
WRAPPER_SCRIPT_LOCATION
-
WRAPPER_BATCH_LOCATION
-
-
Constructor Details
-
GradleWrapper
public GradleWrapper()
-
-
Method Details
-
create
public static GradleWrapper create(@Nullable String distributionTypeName, @Nullable String version, org.openrewrite.ExecutionContext ctx) Construct a Gradle wrapper from a distribution type and version. Used in contexts where downloads.gradle.org is available. -
create
public static GradleWrapper create(@Nullable String currentDistributionUrl, @Nullable String distributionTypeName, @Nullable String version, org.openrewrite.ExecutionContext ctx) -
listAllPublicVersions
public static List<GradleWrapper.GradleVersion> listAllPublicVersions(org.openrewrite.ExecutionContext ctx) -
versionFromDistributionUrl
The Gradle version a wrapper declares, read from thedistributionUrlit points at. Used when noBuildToolmarker is available, which is the case for any parser that isn't the OpenRewrite Gradle plugin. Tolerates custom and mirrored distribution hosts.- Parameters:
distributionUrl- thedistributionUrlvalue, which may still carry the properties-file escaping of:- Returns:
- the version, or
nullwhen the URL contains no recognizable Gradle version
-
create
Construct a Gradle wrapper from a URI. Can be used in contexts where downloads.gradle.org, normally used for version lookups, is unavailable. -
getDistributionUrl
-
getPropertiesFormattedUrl
-
getDistributionChecksum
public @Nullable org.openrewrite.Checksum getDistributionChecksum() -
wrapperJar
public org.openrewrite.remote.RemoteArchive wrapperJar() -
wrapperJar
public org.openrewrite.remote.RemoteArchive wrapperJar(org.openrewrite.SourceFile before) -
gradlew
public org.openrewrite.remote.RemoteResource gradlew() -
gradlewBat
public org.openrewrite.remote.RemoteResource gradlewBat()
-