Class GradleWrapper

java.lang.Object
org.openrewrite.gradle.util.GradleWrapper

public class GradleWrapper extends Object
  • Field Details

    • WRAPPER_JAR_LOCATION_RELATIVE_PATH

      public static final String WRAPPER_JAR_LOCATION_RELATIVE_PATH
      See Also:
    • WRAPPER_PROPERTIES_LOCATION_RELATIVE_PATH

      public static final String WRAPPER_PROPERTIES_LOCATION_RELATIVE_PATH
      See Also:
    • WRAPPER_SCRIPT_LOCATION_RELATIVE_PATH

      public static final String WRAPPER_SCRIPT_LOCATION_RELATIVE_PATH
      See Also:
    • WRAPPER_BATCH_LOCATION_RELATIVE_PATH

      public static final String WRAPPER_BATCH_LOCATION_RELATIVE_PATH
      See Also:
    • WRAPPER_JAR_LOCATION

      public static final Path WRAPPER_JAR_LOCATION
    • WRAPPER_PROPERTIES_LOCATION

      public static final Path WRAPPER_PROPERTIES_LOCATION
    • WRAPPER_SCRIPT_LOCATION

      public static final Path WRAPPER_SCRIPT_LOCATION
    • WRAPPER_BATCH_LOCATION

      public static final Path 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 services.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)
    • create

      public static GradleWrapper create(URI fullDistributionUri, org.openrewrite.ExecutionContext ctx)
      Construct a Gradle wrapper from a URI. Can be used in contexts where services.gradle.org, normally used for version lookups, is unavailable.
    • getDistributionUrl

      public String getDistributionUrl()
    • getPropertiesFormattedUrl

      public String 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()