open class StartParameter : LoggingConfiguration, ParallelismConfiguration, Serializable
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 can obtain an instance of a StartParameter
by either creating a new one, or duplicating an existing one using #newInstance
or #newBuild
.
StartParameter()
Creates a |
static val DEFAULT_GRADLE_USER_HOME: File
The default user home directory. |
|
static val GRADLE_USER_HOME_PROPERTY_KEY: String |
open fun addInitScript(initScriptFile: File): Unit
Adds the given file to the list of init scripts that are run before the build starts. This list is in addition to the default init scripts. |
|
open fun equals(other: Any?): Boolean |
|
open fun getAllInitScripts(): MutableList<File>
Returns all init scripts, including explicit init scripts and implicit init scripts. |
|
open fun getBuildFile(): File
Returns the build file to use to select the default project. Returns null when the build file is not used to select the default project. |
|
open fun getConsoleOutput(): ConsoleOutput
{@inheritDoc} |
|
open fun getCurrentDir(): File
Returns the directory to use to select the default project, and to search for the settings file. |
|
open fun getExcludedTaskNames(): MutableSet<String>
Returns the names of the tasks to be excluded from this build. When empty, no tasks are excluded from the build. |
|
open fun getGradleUserHomeDir(): File
Returns the directory to use as the user home directory. |
|
open fun getIncludedBuilds(): MutableList<File> |
|
open fun getInitScripts(): MutableList<File>
Returns all explicitly added init scripts that will be run before the build starts. This list does not contain the user init script located in ${user.home}/.gradle/init.gradle, even though that init script will also be run. |
|
open fun getLockedDependenciesToUpdate(): MutableList<String>
Returns the list of modules that are to be allowed to update their version compared to the lockfile. |
|
open fun getLogLevel(): LogLevel
{@inheritDoc} |
|
open fun getMaxWorkerCount(): Int
{@inheritDoc} |
|
open fun getProjectCacheDir(): File
Returns the project's cache dir. |
|
open fun getProjectDir(): File
Returns the project dir to use to select the default project. Returns null when the build file is not used to select the default project |
|
open fun getProjectProperties(): MutableMap<String, String> |
|
open fun getSettingsFile(): File
Returns the explicit settings file to use for the build, or null. Will return null if the default settings file is to be used. However, if |
|
open fun getShowStacktrace(): ShowStacktrace
{@inheritDoc} |
|
open fun getSystemPropertiesArgs(): MutableMap<String, String> |
|
open fun getTaskNames(): MutableList<String>
Returns the names of the tasks to execute in this build. When empty, the default tasks for the project will be executed. If TaskExecutionRequests are set for this build then names from these task parameters are returned. |
|
open fun getTaskRequests(): MutableList<TaskExecutionRequest>
Returns the tasks to execute in this build. When empty, the default tasks for the project will be executed. |
|
open fun getWarningMode(): WarningMode
{@inheritDoc} |
|
open fun hashCode(): Int |
|
open fun includeBuild(includedBuild: File): Unit |
|
open fun isBuildCacheDebugLogging(): Boolean
Whether build cache debug logging is enabled. |
|
open fun isBuildCacheEnabled(): Boolean
Returns true if the build cache is enabled. |
|
open fun isBuildProjectDependencies(): Boolean
Returns true if project dependencies are to be built, false if they should not be. The default is true. |
|
open fun isBuildScan(): Boolean
Returns true if build scan should be created. |
|
open fun isConfigureOnDemand(): Boolean
If the configure-on-demand mode is active |
|
open fun isContinueOnFailure(): Boolean
Specifies whether the build should continue on task failure. The default is false. |
|
open fun isContinuous(): Boolean |
|
open fun isDryRun(): Boolean |
|
open fun isInteractive(): Boolean
Returns true when console is interactive. |
|
open fun isNoBuildScan(): Boolean
Returns true when build scan creation is explicitly disabled. |
|
open fun isOffline(): Boolean
Specifies whether the build should be performed offline (ie without network access). |
|
open fun isParallelProjectExecutionEnabled(): Boolean
{@inheritDoc} |
|
open fun isProfile(): Boolean
Returns true if a profile report will be generated. |
|
open fun isRecompileScripts(): Boolean
Specifies whether the build scripts should be recompiled. |
|
open fun isRefreshDependencies(): Boolean
Specifies whether the dependencies should be refreshed.. |
|
open fun isRerunTasks(): Boolean
Specifies whether the cached task results should be ignored and each task should be forced to be executed. |
|
open fun isSearchUpwards(): Boolean |
|
open fun isUseEmptySettings(): Boolean
Returns whether an empty settings script will be used regardless of whether one exists in the default location. |
|
open fun isWriteDependencyLocks(): Boolean
Returns true when dependency resolution is to be persisted for locking |
|
open fun newBuild(): StartParameter
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). |
|
open fun newInstance(): StartParameter
Duplicates this |
|
open fun setBuildCacheDebugLogging(buildCacheDebugLogging: Boolean): Unit
Whether build cache debug logging is enabled. |
|
open fun setBuildCacheEnabled(buildCacheEnabled: Boolean): Unit
Enables/disables the build cache. |
|
open fun setBuildFile(buildFile: File): Unit
Sets the build file to use to select the default project. Use null to disable selecting the default project using the build file. |
|
open fun setBuildProjectDependencies(build: Boolean): StartParameter
Specifies whether project dependencies should be built. Defaults to true. |
|
open fun setBuildScan(buildScan: Boolean): Unit
Specifies whether a build scan should be created. |
|
open fun setConfigureOnDemand(configureOnDemand: Boolean): Unit |
|
open fun setConsoleOutput(consoleOutput: ConsoleOutput): Unit
{@inheritDoc} |
|
open fun setContinueOnFailure(continueOnFailure: Boolean): Unit
Specifies whether the build should continue on task failure. The default is false. |
|
open fun setContinuous(enabled: Boolean): Unit |
|
open fun setCurrentDir(currentDir: File): Unit
Sets the directory to use to select the default project, and to search for the settings file. Set to null to use the default current directory. |
|
open fun setDryRun(dryRun: Boolean): Unit |
|
open fun setExcludedTaskNames(excludedTaskNames: MutableIterable<String>): Unit
Sets the tasks to exclude from this build. |
|
open fun setGradleUserHomeDir(gradleUserHomeDir: File): Unit
Sets the directory to use as the user home directory. Set to null to use the default directory. |
|
open fun setIncludedBuilds(includedBuilds: MutableList<File>): Unit |
|
open fun setInitScripts(initScripts: MutableList<File>): Unit
Sets the list of init scripts to be run before the build starts. This list is in addition to the default init scripts. |
|
open fun setInteractive(interactive: Boolean): Unit
Specifies whether console is interactive. |
|
open fun setLockedDependenciesToUpdate(lockedDependenciesToUpdate: MutableList<String>): Unit
Indicates that specified dependencies are to be allowed to update their version. Implicitly activates dependency locking persistence. |
|
open fun setLogLevel(logLevel: LogLevel): Unit
{@inheritDoc} |
|
open fun setMaxWorkerCount(maxWorkerCount: Int): Unit
{@inheritDoc} |
|
open fun setNoBuildScan(noBuildScan: Boolean): Unit
Specifies whether build scan creation is explicitly disabled. |
|
open fun setOffline(offline: Boolean): Unit
Specifies whether the build should be performed offline (ie without network access). |
|
open fun setParallelProjectExecutionEnabled(parallelProjectExecution: Boolean): Unit
{@inheritDoc} |
|
open fun setProfile(profile: Boolean): Unit
Specifies if a profile report should be generated. |
|
open fun setProjectCacheDir(projectCacheDir: File): Unit
Sets the project's cache location. Set to null to use the default location. |
|
open fun setProjectDir(projectDir: File): Unit
Sets the project directory to use to select the default project. Use null to use the default criteria for selecting the default project. |
|
open fun setProjectProperties(projectProperties: MutableMap<String, String>): Unit |
|
open fun setRecompileScripts(recompileScripts: Boolean): Unit
Specifies whether the build scripts should be recompiled. |
|
open fun setRefreshDependencies(refreshDependencies: Boolean): Unit
Specifies whether the dependencies should be refreshed.. |
|
open fun setRerunTasks(rerunTasks: Boolean): Unit
Specifies whether the cached task results should be ignored and each task should be forced to be executed. |
|
open fun setSearchUpwards(searchUpwards: Boolean): Unit |
|
open fun setSettingsFile(settingsFile: File): Unit
Sets the settings file to use for the build. Use null to use the default settings file. |
|
open fun setShowStacktrace(showStacktrace: ShowStacktrace): Unit
{@inheritDoc} |
|
open fun setSystemPropertiesArgs(systemPropertiesArgs: MutableMap<String, String>): Unit |
|
open fun setTaskNames(taskNames: MutableIterable<String>): Unit
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. |
|
open fun setTaskRequests(taskParameters: MutableIterable<TaskExecutionRequest>): Unit
Sets the task parameters to execute in this build. Set to an empty list, to execute the default tasks for the project. The tasks are executed in the order provided, subject to dependency between the tasks. |
|
open fun setWarningMode(warningMode: WarningMode): Unit
{@inheritDoc} |
|
open fun setWriteDependencyLocks(writeDependencyLocks: Boolean): Unit
Specifies whether dependency resolution needs to be persisted for locking |
|
open fun toString(): String |
|
open fun useEmptySettings(): StartParameter
Specifies that an empty settings script should be used. This means that even if a settings file exists in the conventional location, or has been previously specified by |