# StartParameter

open class StartParameter : LoggingConfiguration, ParallelismConfiguration, Serializable(source)

`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.

## Constructors

StartParameter
Link copied to clipboard
constructor()
Creates a `StartParameter` with default values.

## Properties

currentDir
Link copied to clipboard
open var currentDir: File
DEFAULT_GRADLE_USER_HOME
Link copied to clipboard
val DEFAULT_GRADLE_USER_HOME: File
The default user home directory.
excludedTaskNames
Link copied to clipboard
open val excludedTaskNames: Set<String>
GRADLE_USER_HOME_PROPERTY_KEY
Link copied to clipboard
val GRADLE_USER_HOME_PROPERTY_KEY: String = "gradle.user.home"
gradleUserHomeDir
Link copied to clipboard
open var gradleUserHomeDir: File
includedBuilds
Link copied to clipboard
open var includedBuilds: List<File>
initScripts
Link copied to clipboard
open var initScripts: List<File>
lockedDependenciesToUpdate
Link copied to clipboard
open var lockedDependenciesToUpdate: List<String>
projectCacheDir
Link copied to clipboard
@get: Nullable
open var projectCacheDir: File
projectDir
Link copied to clipboard
@get: Nullable
open var projectDir: File
projectProperties
Link copied to clipboard
open var projectProperties: Map<String, String>
systemPropertiesArgs
Link copied to clipboard
open var systemPropertiesArgs: Map<String, String>
taskRequests
Link copied to clipboard
open val taskRequests: List<TaskExecutionRequest>
welcomeMessageConfiguration
Link copied to clipboard
@get: Incubating
@set: Incubating
open var welcomeMessageConfiguration: WelcomeMessageConfiguration
writeDependencyVerifications
Link copied to clipboard
open var writeDependencyVerifications: List<String>

## Functions

addInitScript
Link copied to clipboard
open fun addInitScript(initScriptFile: File)
Adds the given file to the list of init scripts that are run before the build starts.
equals
Link copied to clipboard
open fun equals(obj: Any): Boolean
getAllInitScripts
Link copied to clipboard
open fun getAllInitScripts(): List<File>
Returns all init scripts, including explicit init scripts and implicit init scripts.
getConsoleOutput
Link copied to clipboard
open fun getConsoleOutput(): ConsoleOutput
Returns the style of logging output that should be written to the console.
getConsoleUnicodeSupport
Link copied to clipboard
open fun getConsoleUnicodeSupport(): ConsoleUnicodeSupport
Returns the type of characters that should be written to the console.
getDependencyVerificationMode
Link copied to clipboard
open fun getDependencyVerificationMode(): DependencyVerificationMode
Returns the dependency verification mode.
getLogLevel
Link copied to clipboard
open fun getLogLevel(): LogLevel
Returns the minimum logging level to use.
getMaxWorkerCount
Link copied to clipboard
open fun getMaxWorkerCount(): Int
Returns the maximum number of concurrent workers used for underlying build operations.
getShowStacktrace
Link copied to clipboard
open fun getShowStacktrace(): ShowStacktrace
Returns the detail that should be included in stacktraces.
getTaskNames
Link copied to clipboard
open fun getTaskNames(): List<String>
Returns the names of the tasks to execute in this build.
getWarningMode
Link copied to clipboard
open fun getWarningMode(): WarningMode
Specifies which type of warnings should be written to the console.
hashCode
Link copied to clipboard
open fun hashCode(): Int
includeBuild
Link copied to clipboard
open fun includeBuild(includedBuild: File)
isBuildCacheDebugLogging
Link copied to clipboard
open fun isBuildCacheDebugLogging(): Boolean
Whether build cache debug logging is enabled.
isBuildCacheEnabled
Link copied to clipboard
open fun isBuildCacheEnabled(): Boolean
Returns true if the build cache is enabled.
isBuildProjectDependencies
Link copied to clipboard
open fun isBuildProjectDependencies(): Boolean
Returns true if project dependencies are to be built, false if they should not be.
isBuildScan
Link copied to clipboard
open fun isBuildScan(): Boolean
Returns true if a Build Scan should be created.
isConfigurationCacheRequested
Link copied to clipboard
@Incubating
open fun isConfigurationCacheRequested(): Boolean
Returns true if configuration caching has been requested.
isConfigureOnDemand
Link copied to clipboard
@Incubating
open fun isConfigureOnDemand(): Boolean
If the configure-on-demand mode is active
isContinueOnFailure
Link copied to clipboard
open fun isContinueOnFailure(): Boolean
Specifies whether the build should continue on task failure.
isContinuous
Link copied to clipboard
open fun isContinuous(): Boolean
isDryRun
Link copied to clipboard
open fun isDryRun(): Boolean
Is the build running as a dry-run?
isExportKeys
Link copied to clipboard
open fun isExportKeys(): Boolean
If true, after writing the dependency verification file, a public keyring file will be generated with all keys seen during generation of the file.
isNoBuildScan
Link copied to clipboard
open fun isNoBuildScan(): Boolean
Returns true when Build Scan creation is explicitly disabled.
isNonInteractive
Link copied to clipboard
open fun isNonInteractive(): Boolean
Can the build do interactive prompting on the console.
isOffline
Link copied to clipboard
open fun isOffline(): Boolean
Specifies whether the build should be performed offline (ie without network access).
isParallelProjectExecutionEnabled
Link copied to clipboard
open fun isParallelProjectExecutionEnabled(): Boolean
Returns true if parallel project execution is enabled.
isProfile
Link copied to clipboard
open fun isProfile(): Boolean
Returns true if a profile report will be generated.
isRefreshDependencies
Link copied to clipboard
open fun isRefreshDependencies(): Boolean
Specifies whether the dependencies should be refreshed..
isRefreshKeys
Link copied to clipboard
open fun isRefreshKeys(): Boolean
If true, Gradle will try to download missing keys again.
isRerunTasks
Link copied to clipboard
open fun isRerunTasks(): Boolean
Specifies whether the cached task results should be ignored and each task should be forced to be executed.
isTaskGraph
Link copied to clipboard
open fun isTaskGraph(): Boolean
Specifies whether the task graph should be printed.
isWriteDependencyLocks
Link copied to clipboard
open fun isWriteDependencyLocks(): Boolean
Returns true when dependency resolution is to be persisted for locking
newBuild
Link copied to clipboard
open fun newBuild(): StartParameter
Creates the parameters for a new build, using these parameters as a template.
newInstance
Link copied to clipboard
open fun newInstance(): StartParameter
Duplicates this `StartParameter` instance.
setBuildCacheDebugLogging
Link copied to clipboard
open fun setBuildCacheDebugLogging(buildCacheDebugLogging: Boolean)
Whether build cache debug logging is enabled.
setBuildCacheEnabled
Link copied to clipboard
open fun setBuildCacheEnabled(buildCacheEnabled: Boolean)
Enables/disables the build cache.
setBuildProjectDependencies
Link copied to clipboard
open fun setBuildProjectDependencies(build: Boolean): StartParameter
Specifies whether project dependencies should be built.
setBuildScan
Link copied to clipboard
open fun setBuildScan(buildScan: Boolean)
Specifies whether a Build Scan should be created.
setConfigureOnDemand
Link copied to clipboard
@Incubating
open fun setConfigureOnDemand(configureOnDemand: Boolean)
setConsoleOutput
Link copied to clipboard
open fun setConsoleOutput(consoleOutput: ConsoleOutput)
Specifies the style of logging output that should be written to the console.
setConsoleUnicodeSupport
Link copied to clipboard
open fun setConsoleUnicodeSupport(unicodeSupport: ConsoleUnicodeSupport)
Specifies the use of Unicode characters in the console output.
setContinueOnFailure
Link copied to clipboard
open fun setContinueOnFailure(continueOnFailure: Boolean)
Specifies whether the build should continue on task failure.
setContinuous
Link copied to clipboard
open fun setContinuous(enabled: Boolean)
setDependencyVerificationMode
Link copied to clipboard
open fun setDependencyVerificationMode(verificationMode: DependencyVerificationMode)
Sets the dependency verification mode.
setDryRun
Link copied to clipboard
open fun setDryRun(dryRun: Boolean)
Enables or disables dry-run.
setExcludedTaskNames
Link copied to clipboard
open fun setExcludedTaskNames(excludedTaskNames: Iterable<String>)
Sets the tasks to exclude from this build.
setExportKeys
Link copied to clipboard
open fun setExportKeys(exportKeys: Boolean)
If true, after writing the dependency verification file, a public keyring file will be generated with all keys seen during generation of the file.
setLogLevel
Link copied to clipboard
open fun setLogLevel(logLevel: LogLevel)
Specifies the minimum logging level to use.
setMaxWorkerCount
Link copied to clipboard
open fun setMaxWorkerCount(maxWorkerCount: Int)
Specifies the maximum number of concurrent workers used for underlying build operations.
setNoBuildScan
Link copied to clipboard
open fun setNoBuildScan(noBuildScan: Boolean)
Specifies whether Build Scan creation is explicitly disabled.
setNonInteractive
Link copied to clipboard
open fun setNonInteractive(nonInteractive: Boolean)
Sets if the build can do interactive prompting on the console.
setOffline
Link copied to clipboard
open fun setOffline(offline: Boolean)
Specifies whether the build should be performed offline (ie without network access).
setParallelProjectExecutionEnabled
Link copied to clipboard
open fun setParallelProjectExecutionEnabled(parallelProjectExecution: Boolean)
Enables/disables parallel project execution.
setProfile
Link copied to clipboard
open fun setProfile(profile: Boolean)
Specifies if a profile report should be generated.
setRefreshDependencies
Link copied to clipboard
open fun setRefreshDependencies(refreshDependencies: Boolean)
Specifies whether the dependencies should be refreshed..
setRefreshKeys
Link copied to clipboard
open fun setRefreshKeys(refresh: Boolean)
Sets the key refresh flag.
setRerunTasks
Link copied to clipboard
open fun setRerunTasks(rerunTasks: Boolean)
Specifies whether the cached task results should be ignored and each task should be forced to be executed.
setShowStacktrace
Link copied to clipboard
open fun setShowStacktrace(showStacktrace: ShowStacktrace)
Sets the detail that should be included in stacktraces.
setTaskGraph
Link copied to clipboard
open fun setTaskGraph(taskGraph: Boolean)
Specifies whether the task graph should be printed.
setTaskNames
Link copied to clipboard
open fun setTaskNames(@Nullable taskNames: @Nullable Iterable<String>)
Sets the tasks to execute in this build.
setTaskRequests
Link copied to clipboard
open fun setTaskRequests(taskParameters: Iterable<out TaskExecutionRequest>)
Sets the task parameters to execute in this build.
setWarningMode
Link copied to clipboard
open fun setWarningMode(warningMode: WarningMode)
Specifies which type of warnings should be written to the console.
setWriteDependencyLocks
Link copied to clipboard
open fun setWriteDependencyLocks(writeDependencyLocks: Boolean)
Specifies whether dependency resolution needs to be persisted for locking
toString
Link copied to clipboard
open fun toString(): String