open class Wrapper : DefaultTask
Generates scripts (for *nix and windows) which allow you to build your project with Gradle, without having to install Gradle.
When a user executes a wrapper script the first time, the script downloads and installs the appropriate Gradle distribution and runs the build against this downloaded distribution. Any installed Gradle distribution is ignored when using the wrapper scripts.
The scripts generated by this task are intended to be committed to your version control system. This task also generates a small gradle-wrapper.jar
bootstrap JAR file and properties file which should also be committed to your VCS. The scripts delegates to this JAR.
class DistributionType
Specifies the Gradle distribution type. |
|
class PathBase
Specifies how the wrapper path should be interpreted. |
Wrapper() |
static val DEFAULT_DISTRIBUTION_PARENT_NAME: String |
open fun getArchiveBase(): PathBase
The archive base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
|
open fun getArchivePath(): String
Returns the path where the gradle distributions archive should be saved (i.e. the parent dir). The path is relative to the archive base directory. |
|
open fun getAvailableDistributionTypes(): MutableList<DistributionType>
The list of available gradle distribution types. |
|
open fun getBatchScript(): File
Returns the file to write the wrapper batch script to. |
|
open fun getDistributionBase(): PathBase
The distribution base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
|
open fun getDistributionPath(): String
Returns the path where the gradle distributions needed by the wrapper are unzipped. The path is relative to the distribution base directory |
|
open fun getDistributionSha256Sum(): String
The SHA-256 hash sum of the gradle distribution. If not set, the hash sum of the gradle distribution is not verified. The wrapper allows for verification of the downloaded Gradle distribution via SHA-256 hash sum comparison. This increases security against targeted attacks by preventing a man-in-the-middle attacker from tampering with the downloaded Gradle distribution. |
|
open fun getDistributionType(): DistributionType
Returns the type of the Gradle distribution to be used by the wrapper. |
|
open fun getDistributionUrl(): String
The URL to download the gradle distribution from. If not set, the download URL is the default for the specified If The wrapper downloads a certain distribution only once and caches it. If your distribution base is the project, you might submit the distribution to your version control system. That way no download is necessary at all. This might be in particular interesting, if you provide a custom gradle snapshot to the wrapper, because you don't need to provide a download server then. |
|
open fun getGradleVersion(): String
Returns the gradle version for the wrapper. |
|
open fun getJarFile(): File
Returns the file to write the wrapper jar file to. |
|
open fun getPropertiesFile(): File
Returns the file to write the wrapper properties to. |
|
open fun getScriptFile(): File
Returns the file to write the wrapper script to. |
|
open fun setArchiveBase(archiveBase: PathBase): Unit
The archive base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
|
open fun setArchivePath(archivePath: String): Unit
Set's the path where the gradle distributions archive should be saved (i.e. the parent dir). The path is relative to the parent dir specified with |
|
open fun setDistributionBase(distributionBase: PathBase): Unit
The distribution base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
|
open fun setDistributionPath(distributionPath: String): Unit
Sets the path where the gradle distributions needed by the wrapper are unzipped. The path is relative to the distribution base directory |
|
open fun setDistributionSha256Sum(distributionSha256Sum: String): Unit
The SHA-256 hash sum of the gradle distribution. If not set, the hash sum of the gradle distribution is not verified. The wrapper allows for verification of the downloaded Gradle distribution via SHA-256 hash sum comparison. This increases security against targeted attacks by preventing a man-in-the-middle attacker from tampering with the downloaded Gradle distribution. |
|
open fun setDistributionType(distributionType: DistributionType): Unit
The type of the Gradle distribution to be used by the wrapper. By default, this is |
|
open fun setDistributionUrl(url: String): Unit
The URL to download the gradle distribution from. If not set, the download URL is the default for the specified If The wrapper downloads a certain distribution only once and caches it. If your distribution base is the project, you might submit the distribution to your version control system. That way no download is necessary at all. This might be in particular interesting, if you provide a custom gradle snapshot to the wrapper, because you don't need to provide a download server then. |
|
open fun setGradleVersion(gradleVersion: String): Unit
The version of the gradle distribution required by the wrapper. This is usually the same version of Gradle you use for building your project. |
|
open fun setJarFile(jarFile: File): Unit open fun setJarFile(jarFile: Any): Unit
The file to write the wrapper jar file to. |
|
open fun setScriptFile(scriptFile: File): Unit open fun setScriptFile(scriptFile: Any): Unit
The file to write the wrapper script to. |