API Documentation: | Wrapper |
---|
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.
Property | Description |
archiveBase | The archive base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
archiveClassifier | The classifier of the archive as part of the download URL. |
archiveName | The name of the archive as part of the download URL. |
archivePath | The path where the gradle distributions archive should be saved (i.e. the parent dir). The path is relative to the archive base directory. |
distributionBase | The distribution base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
distributionPath | The path where the gradle distributions needed by the wrapper are unzipped. The path is relative to the distribution base directory |
gradleVersion | The gradle version for the wrapper. |
jarFile | The file to write the wrapper jar file to. |
propertiesFile | The file to write the wrapper properties to. |
scriptFile | The file to write the wrapper script to. |
urlRoot | The base URL to download the gradle distribution from. |
PathBase
archiveBase
The archive base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir.
- Default:
PathBase.GRADLE_USER_HOME
String
archiveClassifier
The classifier of the archive as part of the download URL.
The download URL is assembled by the pattern: [urlRoot]/[archiveName]-[archiveClassifier]-[gradleVersion].zip
The default for the archive classifier is bin
.
- Default:
'bin'
String
archiveName
The name of the archive as part of the download URL.
The download URL is assembled by the pattern: [urlRoot]/[archiveName]-[archiveClassifier]-[gradleVersion].zip
The default for the archive name is gradle
.
- Default:
'gradle'
String
archivePath
The path where the gradle distributions archive should be saved (i.e. the parent dir). The path is relative to the archive base directory.
- Default:
'wrapper/dists'
PathBase
distributionBase
The distribution base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir.
- Default:
PathBase.GRADLE_USER_HOME
String
distributionPath
The path where the gradle distributions needed by the wrapper are unzipped. The path is relative to the distribution base directory
- Default:
'wrapper/dists'
File
jarFile
The file to write the wrapper jar file to.
- Default:
${project.projectDir}
/gradle/wrapper/gradle-wrapper.jar
File
propertiesFile
(read-only)
The file to write the wrapper properties to.
- Default:
jarFile
, replacing.jar
with.properties
String
urlRoot
The base URL to download the gradle distribution from.
The download URL is assembled by the pattern: [urlRoot]/[archiveName]-[archiveClassifier]-[gradleVersion].zip
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.
- Default:
'http://dist.codehaus.org/gradle'