|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gradle.logging.LoggingConfiguration
org.gradle.StartParameter
public class StartParameter extends org.gradle.logging.LoggingConfiguration
StartParameter defines the configuration used by a GradleLauncher instance to execute a build. The properties of StartParameter generally correspond to the command-line options of Gradle. You pass a StartParameter instance to GradleLauncher.newInstance 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.
Field Summary | |
---|---|
static File |
DEFAULT_GRADLE_USER_HOME
The default user home directory. |
static String |
GRADLE_USER_HOME_PROPERTY_KEY
|
Constructor Summary | |
StartParameter()
Creates a StartParameter with default values. |
Method Summary | |
---|---|
void
|
addInitScript(File initScriptFile)
Adds the given file to the list of init scripts that are run before the build starts. |
boolean
|
equals(Object obj)
|
File
|
getBuildFile()
Returns the build file to use to select the default project. |
org.gradle.groovy.scripts.ScriptSource
|
getBuildScriptSource()
|
CacheUsage
|
getCacheUsage()
|
File
|
getCurrentDir()
Returns the directory to use to select the default project, and to search for the settings file. |
org.gradle.initialization.ProjectSpec
|
getDefaultProjectSelector()
Returns the selector used to choose the default project of the build. |
Set
|
getExcludedTaskNames()
Returns the names of the tasks to be excluded from this build. |
File
|
getGradleUserHomeDir()
Returns the directory to use as the user home directory. |
List
|
getInitScripts()
Returns all explicitly added init scripts that will be run before the build starts. |
Map
|
getMergedSystemProperties()
Returns a newly constructed map that is the JVM system properties merged with the system property args. |
File
|
getProjectCacheDir()
Returns the project's cache dir. |
org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction
|
getProjectDependenciesBuildInstruction()
Returns the project dependencies build instruction. |
Map
|
getProjectProperties()
|
RefreshOptions
|
getRefreshOptions()
Returns the refresh options used for the build. |
org.gradle.groovy.scripts.ScriptSource
|
getSettingsScriptSource()
|
Map
|
getSystemPropertiesArgs()
|
List
|
getTaskNames()
Returns the names of the tasks to execute in this build. |
int
|
hashCode()
|
boolean
|
isBuildProjectDependencies()
Returns true if project dependencies are to be built, false if they should not be. |
boolean
|
isContinueOnFailure()
Specifies whether the build should continue on task failure. |
boolean
|
isDryRun()
|
boolean
|
isNoOpt()
|
boolean
|
isOffline()
Specifies whether the build should be performed offline (ie without network access). |
boolean
|
isProfile()
Returns true if a profile report will be generated. |
boolean
|
isSearchUpwards()
|
StartParameter
|
newBuild()
|
StartParameter
|
newInstance()
Duplicates this StartParameter instance. |
void
|
setBuildFile(File buildFile)
Sets the build file to use to select the default project. |
StartParameter
|
setBuildProjectDependencies(boolean build)
Specifies whether project dependencies should be built. |
StartParameter
|
setBuildScriptSource(org.gradle.groovy.scripts.ScriptSource buildScript)
|
void
|
setCacheUsage(CacheUsage cacheUsage)
|
void
|
setContinueOnFailure(boolean continueOnFailure)
Specifies whether the build should continue on task failure. |
void
|
setCurrentDir(File currentDir)
Sets the directory to use to select the default project, and to search for the settings file. |
void
|
setDefaultProjectSelector(org.gradle.initialization.ProjectSpec defaultProjectSelector)
Sets the selector used to choose the default project of the build. |
void
|
setDryRun(boolean dryRun)
|
void
|
setExcludedTaskNames(Iterable excludedTaskNames)
Sets the tasks to exclude from this build. |
void
|
setGradleUserHomeDir(File gradleUserHomeDir)
Sets the directory to use as the user home directory. |
void
|
setInitScripts(List initScripts)
Sets the list of init scripts to be run before the build starts. |
void
|
setNoOpt(boolean noOpt)
|
void
|
setOffline(boolean offline)
Specifies whether the build should be performed offline (ie without network access). |
void
|
setProfile(boolean profile)
Specifies if a profile report should be generated. |
void
|
setProjectCacheDir(File projectCacheDir)
Sets the project's cache location. |
void
|
setProjectDependenciesBuildInstruction(org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction)
Sets the project dependencies build instruction. |
void
|
setProjectDir(File projectDir)
Sets the project directory to use to select the default project. |
void
|
setProjectProperties(Map projectProperties)
|
void
|
setRefreshOptions(RefreshOptions refreshOptions)
Supplies the refresh options to use for the build. |
void
|
setSearchUpwards(boolean searchUpwards)
|
void
|
setSettingsFile(File settingsFile)
Sets the settings file to use for the build. |
void
|
setSettingsScriptSource(org.gradle.groovy.scripts.ScriptSource settingsScriptSource)
|
void
|
setSystemPropertiesArgs(Map systemPropertiesArgs)
|
void
|
setTaskNames(Iterable taskNames)
|
String
|
toString()
|
StartParameter
|
useEmbeddedBuildFile(String buildScriptText)
|
StartParameter
|
useEmptySettingsScript()
|
Methods inherited from class org.gradle.logging.LoggingConfiguration | |
---|---|
org.gradle.logging.LoggingConfiguration#getShowStacktrace(), org.gradle.logging.LoggingConfiguration#getLogLevel(), org.gradle.logging.LoggingConfiguration#setLogLevel(org.gradle.api.logging.LogLevel), org.gradle.logging.LoggingConfiguration#setColorOutput(boolean), org.gradle.logging.LoggingConfiguration#setShowStacktrace(org.gradle.logging.ShowStacktrace), org.gradle.logging.LoggingConfiguration#isColorOutput(), org.gradle.logging.LoggingConfiguration#wait(long), org.gradle.logging.LoggingConfiguration#wait(long, int), org.gradle.logging.LoggingConfiguration#wait(), org.gradle.logging.LoggingConfiguration#equals(java.lang.Object), org.gradle.logging.LoggingConfiguration#toString(), org.gradle.logging.LoggingConfiguration#hashCode(), org.gradle.logging.LoggingConfiguration#getClass(), org.gradle.logging.LoggingConfiguration#notify(), org.gradle.logging.LoggingConfiguration#notifyAll() |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
public static final File DEFAULT_GRADLE_USER_HOME
public static final String GRADLE_USER_HOME_PROPERTY_KEY
Constructor Detail |
---|
public StartParameter()
Method Detail |
---|
public void addInitScript(File initScriptFile)
initScriptFile
- The init scripts.
public boolean equals(Object obj)
public File getBuildFile()
@Deprecated public org.gradle.groovy.scripts.ScriptSource getBuildScriptSource()
Returns the org.gradle.groovy.scripts.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()
@Deprecated public org.gradle.initialization.ProjectSpec getDefaultProjectSelector()
public Set getExcludedTaskNames()
public File getGradleUserHomeDir()
public List getInitScripts()
public Map getMergedSystemProperties()
System property args take precedency overy JVM system properties.
public File getProjectCacheDir()
@Deprecated public org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction getProjectDependenciesBuildInstruction()
public Map getProjectProperties()
public RefreshOptions getRefreshOptions()
@Deprecated public org.gradle.groovy.scripts.ScriptSource getSettingsScriptSource()
Returns the org.gradle.groovy.scripts.ScriptSource to use for the settings script for this build. Returns null when the default settings script is to be used.
public Map getSystemPropertiesArgs()
public List getTaskNames()
public int hashCode()
public boolean isBuildProjectDependencies()
public boolean isContinueOnFailure()
public boolean isDryRun()
public boolean isNoOpt()
public boolean isOffline()
public boolean isProfile()
public boolean isSearchUpwards()
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 setBuildFile(File buildFile)
buildFile
- The build file. May be null.
public StartParameter setBuildProjectDependencies(boolean build)
@Deprecated public StartParameter setBuildScriptSource(org.gradle.groovy.scripts.ScriptSource 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 void setCacheUsage(CacheUsage cacheUsage)
public void setContinueOnFailure(boolean continueOnFailure)
public void setCurrentDir(File currentDir)
currentDir
- The directory. Should not be null.
@Deprecated public void setDefaultProjectSelector(org.gradle.initialization.ProjectSpec defaultProjectSelector)
defaultProjectSelector
- The selector. Should not be null.
public void setDryRun(boolean dryRun)
public void setExcludedTaskNames(Iterable excludedTaskNames)
excludedTaskNames
- The task names. Can be null.
public void setGradleUserHomeDir(File gradleUserHomeDir)
gradleUserHomeDir
- The home directory. May be null.
public void setInitScripts(List initScripts)
initScripts
- The init scripts.
public void setNoOpt(boolean noOpt)
public void setOffline(boolean offline)
public void setProfile(boolean profile)
profile
- true if a profile report should be generated
public void setProjectCacheDir(File projectCacheDir)
@Deprecated public void setProjectDependenciesBuildInstruction(org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction)
public void setProjectDir(File projectDir)
projectDir
- The project directory. May be null.
public void setProjectProperties(Map projectProperties)
public void setRefreshOptions(RefreshOptions refreshOptions)
public void setSearchUpwards(boolean searchUpwards)
public void setSettingsFile(File settingsFile)
settingsFile
- The settings file to use. May be null.
@Deprecated public void setSettingsScriptSource(org.gradle.groovy.scripts.ScriptSource settingsScriptSource)
Sets the org.gradle.groovy.scripts.ScriptSource to use for the settings script. Set to null to use the default settings script.
settingsScriptSource
- The settings script source.
public void setSystemPropertiesArgs(Map systemPropertiesArgs)
public void setTaskNames(Iterable taskNames)
Sets the tasks to execute in this build. Set to an empty list, or null, to execute the default tasks for the project. The tasks are executed in the order provided, subject to dependency between the tasks.
taskNames
- the names of the tasks to execute in this build.
@Override public String toString()
@Deprecated public StartParameter useEmbeddedBuildFile(String buildScriptText)
Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
buildScriptText
- The script to use as the build file.
public StartParameter useEmptySettingsScript()
Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
Gradle API 1.0-milestone-8