|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gradle.StartParameter
class StartParameter extends java.lang.Object
StartParameter defines the configuration used by a org.gradle.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.
Nested Class Summary | |
---|---|
enum |
StartParameter.ShowStacktrace
|
Constructor Summary | |
StartParameter()
Creates a { |
Method Summary | |
---|---|
boolean
|
equals(java.lang.Object obj)
|
BuildExecuter
|
getBuildExecuter()
Returns the { |
File
|
getBuildFile()
Returns the build file to use to select the default project. |
ScriptSource
|
getBuildScriptSource()
Returns the { |
CacheUsage
|
getCacheUsage()
|
File
|
getCurrentDir()
Returns the directory to use to select the default project, and to search for the settings file. |
File
|
getDefaultImportsFile()
|
ProjectSpec
|
getDefaultProjectSelector()
Returns the selector used to choose the default project of the build. |
File
|
getGradleHomeDir()
|
File
|
getGradleUserHomeDir()
|
LogLevel
|
getLogLevel()
|
File
|
getPluginPropertiesFile()
|
ProjectDependenciesBuildInstruction
|
getProjectDependenciesBuildInstruction()
|
java.util.Map
|
getProjectProperties()
|
ScriptSource
|
getSettingsScriptSource()
Returns the { |
ShowStacktrace
|
getShowStacktrace()
|
java.util.Map
|
getSystemPropertiesArgs()
|
java.util.List
|
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 { |
void
|
setBuildExecuter(BuildExecuter buildExecuter)
Sets the { |
void
|
setBuildFile(File buildFile)
Sets the build file to use to select the default project. |
void
|
setCacheUsage(CacheUsage cacheUsage)
|
void
|
setCurrentDir(File currentDir)
Sets the directory to use to select the default project, and to search for the settings file. |
void
|
setDefaultImportsFile(File defaultImportsFile)
|
void
|
setDefaultProjectSelector(ProjectSpec defaultProjectSelector)
Sets the selector used to choose the default project of the build. |
void
|
setDryRun(boolean dryRun)
|
void
|
setGradleHomeDir(File gradleHomeDir)
|
void
|
setGradleUserHomeDir(File gradleUserHomeDir)
|
void
|
setLogLevel(LogLevel logLevel)
|
void
|
setNoOpt(boolean noOpt)
|
void
|
setPluginPropertiesFile(File pluginPropertiesFile)
|
void
|
setProjectDependenciesBuildInstruction(ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction)
|
void
|
setProjectDir(File projectDir)
Sets the project directory to use to select the default project. |
void
|
setProjectProperties(java.util.Map projectProperties)
|
void
|
setSearchUpwards(boolean searchUpwards)
|
void
|
setSettingsFile(File settingsFile)
Sets the settings file to use for the build. |
void
|
setSettingsScriptSource(ScriptSource settingsScriptSource)
Sets the { |
void
|
setShowHelp(boolean showHelp)
|
void
|
setShowStacktrace(ShowStacktrace showStacktrace)
|
void
|
setShowVersion(boolean showVersion)
|
void
|
setSystemPropertiesArgs(java.util.Map systemPropertiesArgs)
|
void
|
setTaskNames(java.util.List 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. |
StartParameter
|
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
org.gradle.StartParameter[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Object | |
---|---|
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll |
Constructor Detail |
---|
public StartParameter()
Method Detail |
---|
public boolean equals(java.lang.Object obj)
public BuildExecuter getBuildExecuter()
Returns the BuildExecuter to use for the build.
public File getBuildFile()
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 CacheUsage getCacheUsage()
public File getCurrentDir()
public File getDefaultImportsFile()
public ProjectSpec getDefaultProjectSelector()
public File getGradleHomeDir()
public File getGradleUserHomeDir()
public LogLevel getLogLevel()
public File getPluginPropertiesFile()
public ProjectDependenciesBuildInstruction getProjectDependenciesBuildInstruction()
public java.util.Map getProjectProperties()
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 ShowStacktrace getShowStacktrace()
public java.util.Map getSystemPropertiesArgs()
public java.util.List getTaskNames()
public int hashCode()
public boolean isDryRun()
public boolean isNoOpt()
public boolean isSearchUpwards()
public boolean isShowHelp()
public boolean isShowVersion()
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 StartParameter newInstance()
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.
public void setBuildFile(File buildFile)
public void setCacheUsage(CacheUsage cacheUsage)
public void setCurrentDir(File currentDir)
public void setDefaultImportsFile(File defaultImportsFile)
public void setDefaultProjectSelector(ProjectSpec defaultProjectSelector)
public void setDryRun(boolean dryRun)
public void setGradleHomeDir(File gradleHomeDir)
public void setGradleUserHomeDir(File gradleUserHomeDir)
public void setLogLevel(LogLevel logLevel)
public void setNoOpt(boolean noOpt)
public void setPluginPropertiesFile(File pluginPropertiesFile)
public void setProjectDependenciesBuildInstruction(ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction)
public void setProjectDir(File projectDir)
public void setProjectProperties(java.util.Map projectProperties)
public void setSearchUpwards(boolean searchUpwards)
public void setSettingsFile(File settingsFile)
public void setSettingsScriptSource(ScriptSource settingsScriptSource)
Sets the ScriptSource to use for the settings script. Set to null to use the default settings script.
public void setShowHelp(boolean showHelp)
public void setShowStacktrace(ShowStacktrace showStacktrace)
public void setShowVersion(boolean showVersion)
public void setSystemPropertiesArgs(java.util.Map systemPropertiesArgs)
public void setTaskNames(java.util.List taskNames)
Sets the tasks to execute in this build. Set to an empty list, or null, to execute the default tasks for the project.
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.
StartParameter valueOf(java.lang.String name)
org.gradle.StartParameter[] values()
Groovy Documentation