|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gradle.api.internal.AbstractTask org.gradle.api.DefaultTask org.gradle.api.tasks.wrapper.Wrapper
public class 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.
Nested Class Summary | |
---|---|
static class |
Wrapper.PathBase
Specifies how the wrapper path should be interpreted. |
Field Summary | |
---|---|
static String |
DEFAULT_ARCHIVE_CLASSIFIER
|
static String |
DEFAULT_ARCHIVE_NAME
|
static String |
DEFAULT_DISTRIBUTION_PARENT_NAME
|
Fields inherited from interface org.gradle.api.Task |
---|
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_NAME, TASK_OVERWRITE, TASK_TYPE |
Constructor Summary | |
---|---|
Wrapper()
|
Method Summary | |
---|---|
Wrapper.PathBase |
getArchiveBase()
The archive base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
String |
getArchiveClassifier()
Deprecated. |
String |
getArchiveName()
Deprecated. |
String |
getArchivePath()
Returns the path where the gradle distributions archive should be saved (i.e. |
Wrapper.PathBase |
getDistributionBase()
The distribution base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
String |
getDistributionPath()
Returns the path where the gradle distributions needed by the wrapper are unzipped. |
String |
getDistributionUrl()
The URL to download the gradle distribution from. |
String |
getGradleVersion()
Returns the gradle version for the wrapper. |
File |
getJarFile()
Returns the file to write the wrapper jar file to. |
String |
getJarPath()
Deprecated. |
File |
getPropertiesFile()
Returns the file to write the wrapper properties to. |
String |
getScriptDestinationPath()
Deprecated. |
File |
getScriptFile()
Returns the file to write the wrapper script to. |
org.gradle.api.tasks.wrapper.internal.WrapperScriptGenerator |
getUnixWrapperScriptGenerator()
|
String |
getUrlRoot()
Deprecated. |
void |
setArchiveBase(Wrapper.PathBase archiveBase)
The archive base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
void |
setArchiveClassifier(String archiveClassifier)
Deprecated. |
void |
setArchiveName(String archiveName)
Deprecated. |
void |
setArchivePath(String archivePath)
Set's the path where the gradle distributions archive should be saved (i.e. |
void |
setDistributionBase(Wrapper.PathBase distributionBase)
The distribution base specifies whether the unpacked wrapper distribution should be stored in the project or in the gradle user home dir. |
void |
setDistributionPath(String distributionPath)
Sets the path where the gradle distributions needed by the wrapper are unzipped. |
void |
setDistributionUrl(String url)
|
void |
setGradleVersion(String gradleVersion)
The version of the gradle distribution required by the wrapper. |
void |
setJarFile(Object jarFile)
|
void |
setJarPath(String jarPath)
Deprecated. |
void |
setScriptDestinationPath(String scriptDestinationPath)
Deprecated. |
void |
setScriptFile(Object scriptFile)
|
void |
setUnixWrapperScriptGenerator(org.gradle.api.tasks.wrapper.internal.WrapperScriptGenerator wrapperScriptGenerator)
|
void |
setUrlRoot(String urlRoot)
Deprecated. |
Methods inherited from class org.gradle.api.internal.AbstractTask |
---|
captureStandardOutput, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doFirst, doLast, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuter, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getTaskDependencies, getTemporaryDir, hashCode, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_DISTRIBUTION_PARENT_NAME
public static final String DEFAULT_ARCHIVE_NAME
public static final String DEFAULT_ARCHIVE_CLASSIFIER
Constructor Detail |
---|
public Wrapper()
Method Detail |
---|
public File getScriptFile()
public void setScriptFile(Object scriptFile)
@Deprecated public String getScriptDestinationPath()
setScriptDestinationPath(String)
@Deprecated public void setScriptDestinationPath(String scriptDestinationPath)
scriptDestinationPath
- Any object which toString
method specifies the path. Most likely a
String or File object.public File getJarFile()
public void setJarFile(Object jarFile)
public File getPropertiesFile()
@Deprecated public String getJarPath()
setJarPath(String)
@Deprecated public void setJarPath(String jarPath)
public String getDistributionPath()
setDistributionPath(String)
public void setDistributionPath(String distributionPath)
setDistributionPath(String)
public String getGradleVersion()
setGradleVersion(String)
public void setGradleVersion(String gradleVersion)
public String getDistributionUrl()
If not set, the download URL is assembled by the pattern: [urlRoot]/[archiveName]-[gradleVersion]-[archiveClassifier].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.
public void setDistributionUrl(String url)
@Deprecated public String getUrlRoot()
The download URL is assembled by the pattern: [urlRoot]/[archiveName]-[gradleVersion]-[archiveClassifier].zip
@Deprecated public void setUrlRoot(String urlRoot)
public Wrapper.PathBase getDistributionBase()
public void setDistributionBase(Wrapper.PathBase distributionBase)
public String getArchivePath()
public void setArchivePath(String archivePath)
getArchiveBase()
.
public Wrapper.PathBase getArchiveBase()
public void setArchiveBase(Wrapper.PathBase archiveBase)
@Deprecated public String getArchiveName()
The download URL is assembled by the pattern: [urlRoot]/[archiveName]-[gradleVersion]-[archiveClassifier].zip
The default for the archive name is "gradle".
@Deprecated public void setArchiveName(String archiveName)
@Deprecated public String getArchiveClassifier()
The download URL is assembled by the pattern: [urlRoot]/[archiveName]-[gradleVersion]-[archiveClassifier].zip
The default for the archive classifier is "bin".
@Deprecated public void setArchiveClassifier(String archiveClassifier)
public org.gradle.api.tasks.wrapper.internal.WrapperScriptGenerator getUnixWrapperScriptGenerator()
public void setUnixWrapperScriptGenerator(org.gradle.api.tasks.wrapper.internal.WrapperScriptGenerator wrapperScriptGenerator)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |