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 can obtain an instance of a StartParameter by either creating a new one, or duplicating an existing one using newInstance or newBuild.

Constructors

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

Properties

Link copied to clipboard
@get:Nullable
open var buildFile: File
Link copied to clipboard
open var currentDir: File
Link copied to clipboard
The default user home directory.
Link copied to clipboard
Link copied to clipboard
val GRADLE_USER_HOME_PROPERTY_KEY: String = "gradle.user.home"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var initScripts: List<File>
Link copied to clipboard
Link copied to clipboard
@get:Nullable
open var projectCacheDir: File
Link copied to clipboard
@get:Nullable
open var projectDir: File
Link copied to clipboard
Link copied to clipboard
@get:Nullable
open var settingsFile: File
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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.
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
Returns all init scripts, including explicit init scripts and implicit init scripts.
Link copied to clipboard
Link copied to clipboard
Returns the dependency verification mode.
Link copied to clipboard
open fun getLogLevel(): LogLevel
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun getTaskNames(): List<String>
Returns the names of the tasks to execute in this build.
Link copied to clipboard
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun includeBuild(includedBuild: File)
Link copied to clipboard
Whether build cache debug logging is enabled.
Link copied to clipboard
Returns true if the build cache is enabled.
Link copied to clipboard
Returns true if project dependencies are to be built, false if they should not be.
Link copied to clipboard
open fun isBuildScan(): Boolean
Returns true if build scan should be created.
Link copied to clipboard
Returns true if configuration caching has been requested.
Link copied to clipboard
If the configure-on-demand mode is active
Link copied to clipboard
Specifies whether the build should continue on task failure.
Link copied to clipboard
open fun isContinuous(): Boolean
Link copied to clipboard
open fun isDryRun(): Boolean
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.
Link copied to clipboard
Returns true when build scan creation is explicitly disabled.
Link copied to clipboard
open fun isOffline(): Boolean
Specifies whether the build should be performed offline (ie without network access).
Link copied to clipboard
open fun isProfile(): Boolean
Returns true if a profile report will be generated.
Link copied to clipboard
Specifies whether the dependencies should be refreshed..
Link copied to clipboard
If true, Gradle will try to download missing keys again.
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.
Link copied to clipboard
Returns true when dependency resolution is to be persisted for locking
Link copied to clipboard
Creates the parameters for a new build, using these parameters as a template.
Link copied to clipboard
Duplicates this StartParameter instance.
Link copied to clipboard
open fun setBuildCacheDebugLogging(buildCacheDebugLogging: Boolean)
Whether build cache debug logging is enabled.
Link copied to clipboard
open fun setBuildCacheEnabled(buildCacheEnabled: Boolean)
Enables/disables the build cache.
Link copied to clipboard
Specifies whether project dependencies should be built.
Link copied to clipboard
open fun setBuildScan(buildScan: Boolean)
Specifies whether a build scan should be created.
Link copied to clipboard
open fun setConfigureOnDemand(configureOnDemand: Boolean)
Link copied to clipboard
open fun setConsoleOutput(consoleOutput: ConsoleOutput)
Link copied to clipboard
open fun setContinueOnFailure(continueOnFailure: Boolean)
Specifies whether the build should continue on task failure.
Link copied to clipboard
open fun setContinuous(enabled: Boolean)
Link copied to clipboard
Sets the dependency verification mode.
Link copied to clipboard
open fun setDryRun(dryRun: Boolean)
Link copied to clipboard
open fun setExcludedTaskNames(excludedTaskNames: Iterable<String>)
Sets the tasks to exclude from this build.
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.
Link copied to clipboard
open fun setLogLevel(logLevel: LogLevel)
Link copied to clipboard
open fun setMaxWorkerCount(maxWorkerCount: Int)
Link copied to clipboard
open fun setNoBuildScan(noBuildScan: Boolean)
Specifies whether build scan creation is explicitly disabled.
Link copied to clipboard
open fun setOffline(offline: Boolean)
Specifies whether the build should be performed offline (ie without network access).
Link copied to clipboard
open fun setParallelProjectExecutionEnabled(parallelProjectExecution: Boolean)
Link copied to clipboard
open fun setProfile(profile: Boolean)
Specifies if a profile report should be generated.
Link copied to clipboard
open fun setRefreshDependencies(refreshDependencies: Boolean)
Specifies whether the dependencies should be refreshed..
Link copied to clipboard
open fun setRefreshKeys(refresh: Boolean)
Sets the key refresh flag.
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.
Link copied to clipboard
open fun setShowStacktrace(showStacktrace: ShowStacktrace)
Link copied to clipboard
open fun setTaskNames(@Nullable taskNames: Iterable<String>)
Sets the tasks to execute in this build.
Link copied to clipboard
open fun setTaskRequests(taskParameters: Iterable<out TaskExecutionRequest>)
Sets the task parameters to execute in this build.
Link copied to clipboard
open fun setWarningMode(warningMode: WarningMode)
Link copied to clipboard
open fun setWriteDependencyLocks(writeDependencyLocks: Boolean)
Specifies whether dependency resolution needs to be persisted for locking
Link copied to clipboard
open fun toString(): String