|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gradle.StartParameter
public class StartParameter
StartParameter
defines the configuration used by a Gradle
instance to execute a build. The
properties of StartParameter
generally correspond to the command-line options of Gradle. You pass a StartParameter
instance to Gradle.newInstance(StartParameter)
when you create a new Gradle
instance.
You can obtain an instance of a StartParameter
by either creating a new one, or duplicating an existing
one using newInstance()
or newBuild()
.
Gradle
Nested Class Summary | |
---|---|
static class |
StartParameter.ShowStacktrace
|
Constructor Summary | |
---|---|
StartParameter()
Creates a StartParameter with default values. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
BuildExecuter |
getBuildExecuter()
Returns the BuildExecuter to use for the build. |
java.io.File |
getBuildFile()
Returns the build file to use to select the default project. |
ScriptSource |
getBuildScriptSource()
Returns the ScriptSource to use for the build file for this build. |
CacheUsage |
getCacheUsage()
|
java.io.File |
getCurrentDir()
Returns the directory to use to select the default project, and to search for the settings file. |
java.io.File |
getDefaultImportsFile()
|
ProjectSpec |
getDefaultProjectSelector()
Returns the selector used to choose the default project of the build. |
java.io.File |
getGradleHomeDir()
|
java.io.File |
getGradleUserHomeDir()
|
LogLevel |
getLogLevel()
|
java.io.File |
getPluginPropertiesFile()
|
ProjectDependenciesBuildInstruction |
getProjectDependenciesBuildInstruction()
|
java.util.Map<java.lang.String,java.lang.String> |
getProjectProperties()
|
ScriptSource |
getSettingsScriptSource()
Returns the ScriptSource to use for the settings script for this build. |
StartParameter.ShowStacktrace |
getShowStacktrace()
|
java.util.Map<java.lang.String,java.lang.String> |
getSystemPropertiesArgs()
|
java.util.List<java.lang.String> |
getTaskNames()
Returns the names of the tasks to execute in this build. |
int |
hashCode()
|
boolean |
isDryRun()
|
boolean |
isNoOpt()
|
boolean |
isSearchUpwards()
|
boolean |
isShowHelp()
|
boolean |
isShowVersion()
|
StartParameter |
newBuild()
Creates the parameters for a new build, using these parameters as a template. |
StartParameter |
newInstance()
Duplicates this StartParameter instance. |
void |
setBuildExecuter(BuildExecuter buildExecuter)
Sets the BuildExecuter to use for the build. |
void |
setBuildFile(java.io.File buildFile)
Sets the build file to use to select the default project. |
void |
setCacheUsage(CacheUsage cacheUsage)
|
void |
setCurrentDir(java.io.File currentDir)
Sets the directory to use to select the default project, and to search for the settings file. |
void |
setDefaultImportsFile(java.io.File defaultImportsFile)
|
void |
setDefaultProjectSelector(ProjectSpec defaultProjectSelector)
Sets the selector used to choose the default project of the build. |
void |
setDryRun(boolean dryRun)
|
void |
setGradleHomeDir(java.io.File gradleHomeDir)
|
void |
setGradleUserHomeDir(java.io.File gradleUserHomeDir)
|
void |
setLogLevel(LogLevel logLevel)
|
void |
setNoOpt(boolean noOpt)
|
void |
setPluginPropertiesFile(java.io.File pluginPropertiesFile)
|
void |
setProjectDependenciesBuildInstruction(ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction)
|
void |
setProjectDir(java.io.File projectDir)
Sets the project directory to use to select the default project. |
void |
setProjectProperties(java.util.Map<java.lang.String,java.lang.String> projectProperties)
|
void |
setSearchUpwards(boolean searchUpwards)
|
void |
setSettingsFile(java.io.File settingsFile)
Sets the settings file to use for the build. |
void |
setSettingsScriptSource(ScriptSource settingsScriptSource)
Sets the ScriptSource to use for the settings script. |
void |
setShowHelp(boolean showHelp)
|
void |
setShowStacktrace(StartParameter.ShowStacktrace showStacktrace)
|
void |
setShowVersion(boolean showVersion)
|
void |
setSystemPropertiesArgs(java.util.Map<java.lang.String,java.lang.String> systemPropertiesArgs)
|
void |
setTaskNames(java.util.List<java.lang.String> taskNames)
Sets the tasks to execute in this build. |
StartParameter |
useEmbeddedBuildFile(java.lang.String buildScript)
Specifies that the given script should be used as the build file for this build. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StartParameter()
StartParameter
with default values. This is roughly equivalent to running Gradle on the
command-line with no arguments.
Method Detail |
---|
public StartParameter newInstance()
StartParameter
instance.
public StartParameter newBuild()
Creates the parameters for a new build, using these parameters as a template. Copies the environmental properties from this parameter (eg gradle user home dir, etc), but does not copy the build specific properties (eg task names).
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.io.File getBuildFile()
public void setBuildFile(java.io.File buildFile)
buildFile
- The build file. May be null.public java.io.File getGradleHomeDir()
public void setGradleHomeDir(java.io.File gradleHomeDir)
public ScriptSource getBuildScriptSource()
Returns the ScriptSource
to use for the build file for this build. Returns null when the default build
file(s) are to be used. This source is used for all projects included in the build.
public ScriptSource getSettingsScriptSource()
Returns the ScriptSource
to use for the settings script for this build. Returns null when the default
settings script is to be used.
public void setSettingsScriptSource(ScriptSource settingsScriptSource)
Sets the ScriptSource
to use for the settings script. Set to null to use the default settings
script.
settingsScriptSource
- The settings script source.public StartParameter useEmbeddedBuildFile(java.lang.String buildScript)
Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
buildScript
- The script to use as the build file.
public BuildExecuter getBuildExecuter()
Returns the BuildExecuter
to use for the build.
BuildExecuter
. Never returns null.public void setBuildExecuter(BuildExecuter buildExecuter)
Sets the BuildExecuter
to use for the build. You can use the method to change the algorithm used to
execute the build, by providing your own BuildExecuter
implementation.
Set to null to use the default executer. When this property is set to a non-null value, the taskNames and mergedBuild properties are ignored.
buildExecuter
- The executer to use, or null to use the default executer.public java.util.List<java.lang.String> getTaskNames()
public void setTaskNames(java.util.List<java.lang.String> taskNames)
Sets the tasks to execute in this build. Set to an empty list, or null, to execute the default tasks for the project.
taskNames
- the names of the tasks to execute in this build.public java.io.File getCurrentDir()
public void setCurrentDir(java.io.File currentDir)
currentDir
- The directory. Should not be null.public boolean isSearchUpwards()
public void setSearchUpwards(boolean searchUpwards)
public java.util.Map<java.lang.String,java.lang.String> getProjectProperties()
public void setProjectProperties(java.util.Map<java.lang.String,java.lang.String> projectProperties)
public java.util.Map<java.lang.String,java.lang.String> getSystemPropertiesArgs()
public void setSystemPropertiesArgs(java.util.Map<java.lang.String,java.lang.String> systemPropertiesArgs)
public java.io.File getGradleUserHomeDir()
public void setGradleUserHomeDir(java.io.File gradleUserHomeDir)
public java.io.File getDefaultImportsFile()
public void setDefaultImportsFile(java.io.File defaultImportsFile)
public java.io.File getPluginPropertiesFile()
public void setPluginPropertiesFile(java.io.File pluginPropertiesFile)
public ProjectDependenciesBuildInstruction getProjectDependenciesBuildInstruction()
public void setProjectDependenciesBuildInstruction(ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction)
public CacheUsage getCacheUsage()
public void setCacheUsage(CacheUsage cacheUsage)
public boolean isShowHelp()
public void setShowHelp(boolean showHelp)
public boolean isShowVersion()
public void setShowVersion(boolean showVersion)
public boolean isDryRun()
public void setDryRun(boolean dryRun)
public boolean isNoOpt()
public void setNoOpt(boolean noOpt)
public void setSettingsFile(java.io.File settingsFile)
settingsFile
- The settings file to use. May be null.public LogLevel getLogLevel()
public void setLogLevel(LogLevel logLevel)
public StartParameter.ShowStacktrace getShowStacktrace()
public void setShowStacktrace(StartParameter.ShowStacktrace showStacktrace)
public ProjectSpec getDefaultProjectSelector()
public void setDefaultProjectSelector(ProjectSpec defaultProjectSelector)
defaultProjectSelector
- The selector. Should not be null.public void setProjectDir(java.io.File projectDir)
projectDir
- The project directory. May be null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |