Package org.gradle

# Class StartParameter

java.lang.Object
org.gradle.StartParameter

All Implemented Interfaces:
  `Serializable`, `LoggingConfiguration`, `ParallelismConfiguration`

public class StartParameter extends Object implements 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()`.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final File`
  `DEFAULT_GRADLE_USER_HOME`
  The default user home directory.
  `static final String`
  `GRADLE_USER_HOME_PROPERTY_KEY`
  `protected File`
  `gradleHomeDir`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  ``
  `StartParameter()`
  Creates a `StartParameter` with default values.
  `protected`
  `StartParameter(org.gradle.initialization.BuildLayoutParameters layoutParameters)`
  Creates a `StartParameter` initialized from the given `BuildLayoutParameters`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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)`
  `List<File>`
  `getAllInitScripts()`
  Returns all init scripts, including explicit init scripts and implicit init scripts.
  `ConsoleOutput`
  `getConsoleOutput()`
  Returns the style of logging output that should be written to the console.
  `ConsoleUnicodeSupport`
  `getConsoleUnicodeSupport()`
  Returns the type of characters that should be written to the console.
  `File`
  `getCurrentDir()`
  Returns the directory to use to select the default project, and to search for the settings file.
  `DependencyVerificationMode`
  `getDependencyVerificationMode()`
  Returns the dependency verification mode.
  `Set<String>`
  `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<File>`
  `getIncludedBuilds()`
  `List<File>`
  `getInitScripts()`
  Returns all explicitly added init scripts that will be run before the build starts.
  `List<String>`
  `getLockedDependenciesToUpdate()`
  Returns the list of modules that are to be allowed to update their version compared to the lockfile.
  `LogLevel`
  `getLogLevel()`
  Returns the minimum logging level to use.
  `int`
  `getMaxWorkerCount()`
  Returns the maximum number of concurrent workers used for underlying build operations.
  `@Nullable File`
  `getProjectCacheDir()`
  Returns the project's cache dir.
  `@Nullable File`
  `getProjectDir()`
  Returns the project dir to use to select the default project.
  `Map<String,String>`
  `getProjectProperties()`
  Key-value map of project properties.
  `ShowStacktrace`
  `getShowStacktrace()`
  Returns the detail that should be included in stacktraces.
  `Map<String,String>`
  `getSystemPropertiesArgs()`
  Key-value map of system properties.
  `List<String>`
  `getTaskNames()`
  Returns the names of the tasks to execute in this build.
  `List<TaskExecutionRequest>`
  `getTaskRequests()`
  Returns the tasks to execute in this build.
  `WarningMode`
  `getWarningMode()`
  Specifies which type of warnings should be written to the console.
  `WelcomeMessageConfiguration`
  `getWelcomeMessageConfiguration()`
  Returns when to display a welcome message on the command line.
  `List<String>`
  `getWriteDependencyVerifications()`
  Indicates if a dependency verification metadata file should be written at the end of this build.
  `int`
  `hashCode()`
  `void`
  `includeBuild(File includedBuild)`
  `boolean`
  `isBuildCacheDebugLogging()`
  Whether build cache debug logging is enabled.
  `boolean`
  `isBuildCacheEnabled()`
  Returns true if the build cache is enabled.
  `boolean`
  `isBuildProjectDependencies()`
  Returns true if project dependencies are to be built, false if they should not be.
  `boolean`
  `isBuildScan()`
  Returns true if a Build Scan should be created.
  `boolean`
  `isConfigurationCacheRequested()`
  Deprecated.
  Use `Configuration Cache build feature` instead.
  `boolean`
  `isConfigureOnDemand()`
  If the configure-on-demand mode is active
  `boolean`
  `isContinueOnFailure()`
  Specifies whether the build should continue on task failure.
  `boolean`
  `isContinuous()`
  `boolean`
  `isDryRun()`
  Is the build running as a dry-run? Dry-run means task actions do not execute for the root build.
  `boolean`
  `isExportKeys()`
  If true, after writing the dependency verification file, a public keyring file will be generated with all keys seen during generation of the file.
  `boolean`
  `isInteractive()`
  Whether the build may prompt the user for input on the console.
  `boolean`
  `isNoBuildScan()`
  Returns true when Build Scan creation is explicitly disabled.
  `boolean`
  `isOffline()`
  Specifies whether the build should be performed offline (ie without network access).
  `boolean`
  `isParallelProjectExecutionEnabled()`
  Returns true if parallel project execution is enabled.
  `boolean`
  `isProfile()`
  Returns true if a profile report will be generated.
  `boolean`
  `isRefreshDependencies()`
  Specifies whether the dependencies should be refreshed..
  `boolean`
  `isRefreshKeys()`
  If true, Gradle will try to download missing keys again.
  `boolean`
  `isRerunTasks()`
  Specifies whether the cached task results should be ignored and each task should be forced to be executed.
  `boolean`
  `isTaskGraph()`
  Specifies whether the task graph should be printed.
  `boolean`
  `isWriteDependencyLocks()`
  Returns true when dependency resolution is to be persisted for locking
  `StartParameter`
  `newBuild()`
  Creates the parameters for a new build, using these parameters as a template.
  `StartParameter`
  `newInstance()`
  Duplicates this `StartParameter` instance.
  `protected StartParameter`
  `prepareNewBuild(StartParameter p)`
  `protected StartParameter`
  `prepareNewInstance(StartParameter p)`
  `void`
  `setBuildCacheDebugLogging(boolean buildCacheDebugLogging)`
  Whether build cache debug logging is enabled.
  `void`
  `setBuildCacheEnabled(boolean buildCacheEnabled)`
  Enables/disables the build cache.
  `StartParameter`
  `setBuildProjectDependencies(boolean build)`
  Specifies whether project dependencies should be built.
  `void`
  `setBuildScan(boolean buildScan)`
  Specifies whether a Build Scan should be created.
  `void`
  `setConfigureOnDemand(boolean configureOnDemand)`
  `void`
  `setConsoleOutput(ConsoleOutput consoleOutput)`
  Specifies the style of logging output that should be written to the console.
  `void`
  `setConsoleUnicodeSupport(ConsoleUnicodeSupport unicodeSupport)`
  Specifies the use of Unicode characters in the console output.
  `void`
  `setContinueOnFailure(boolean continueOnFailure)`
  Specifies whether the build should continue on task failure.
  `void`
  `setContinuous(boolean enabled)`
  `void`
  `setCurrentDir(@Nullable File currentDir)`
  Sets the directory to use to select the default project, and to search for the settings file.
  `void`
  `setDependencyVerificationMode(DependencyVerificationMode verificationMode)`
  Sets the dependency verification mode.
  `void`
  `setDryRun(boolean dryRun)`
  Enables or disables dry-run.
  `void`
  `setExcludedTaskNames(Iterable<String> excludedTaskNames)`
  Sets the tasks to exclude from this build.
  `void`
  `setExportKeys(boolean exportKeys)`
  If true, after writing the dependency verification file, a public keyring file will be generated with all keys seen during generation of the file.
  `(package private) void`
  `setGradleHomeDir(File gradleHomeDir)`
  Package scope for testing purposes.
  `void`
  `setGradleUserHomeDir(@Nullable File gradleUserHomeDir)`
  Sets the directory to use as the user home directory.
  `void`
  `setIncludedBuilds(List<File> includedBuilds)`
  `void`
  `setInitScripts(List<File> initScripts)`
  Sets the list of init scripts to be run before the build starts.
  `void`
  `setInteractive(boolean interactive)`
  Sets whether the build may prompt the user for input on the console.
  `void`
  `setLockedDependenciesToUpdate(List<String> lockedDependenciesToUpdate)`
  Indicates that specified dependencies are to be allowed to update their version.
  `void`
  `setLogLevel(LogLevel logLevel)`
  Specifies the minimum logging level to use.
  `void`
  `setMaxWorkerCount(int maxWorkerCount)`
  Specifies the maximum number of concurrent workers used for underlying build operations.
  `void`
  `setNoBuildScan(boolean noBuildScan)`
  Specifies whether Build Scan creation is explicitly disabled.
  `void`
  `setOffline(boolean offline)`
  Specifies whether the build should be performed offline (ie without network access).
  `void`
  `setParallelProjectExecutionEnabled(boolean parallelProjectExecution)`
  Enables/disables parallel project execution.
  `void`
  `setProfile(boolean profile)`
  Specifies if a profile report should be generated.
  `void`
  `setProjectCacheDir(@Nullable File projectCacheDir)`
  Sets the project's cache location.
  `void`
  `setProjectDir(@Nullable File projectDir)`
  Sets the project directory to use to select the default project.
  `void`
  `setProjectProperties(Map<String,String> projectProperties)`
  Sets the project properties.
  `void`
  `setRefreshDependencies(boolean refreshDependencies)`
  Specifies whether the dependencies should be refreshed..
  `void`
  `setRefreshKeys(boolean refresh)`
  Sets the key refresh flag.
  `void`
  `setRerunTasks(boolean rerunTasks)`
  Specifies whether the cached task results should be ignored and each task should be forced to be executed.
  `void`
  `setShowStacktrace(ShowStacktrace showStacktrace)`
  Sets the detail that should be included in stacktraces.
  `void`
  `setSystemPropertiesArgs(Map<String,String> systemPropertiesArgs)`
  Sets the system properties.
  `void`
  `setTaskGraph(boolean taskGraph)`
  Specifies whether the task graph should be printed.
  `void`
  `setTaskNames(@Nullable Iterable<String> taskNames)`
  Sets the tasks to execute in this build.
  `void`
  `setTaskRequests(Iterable<? extends TaskExecutionRequest> taskParameters)`
  Sets the task parameters to execute in this build.
  `void`
  `setWarningMode(WarningMode warningMode)`
  Specifies which type of warnings should be written to the console.
  `void`
  `setWelcomeMessageConfiguration(WelcomeMessageConfiguration welcomeMessageConfiguration)`
  Updates when to display a welcome message on the command line.
  `void`
  `setWriteDependencyLocks(boolean writeDependencyLocks)`
  Specifies whether dependency resolution needs to be persisted for locking
  `void`
  `setWriteDependencyVerifications(List<String> checksums)`
  Tells if a dependency verification metadata file should be written at the end of this build.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### GRADLE_USER_HOME_PROPERTY_KEY

    public static final String GRADLE_USER_HOME_PROPERTY_KEY
    See Also:
      - Constant Field Values

  - ### DEFAULT_GRADLE_USER_HOME

    public static final File DEFAULT_GRADLE_USER_HOME
    The default user home directory.

  - ### gradleHomeDir

    protected File gradleHomeDir

- ## Constructor Details

  - ### StartParameter

    public StartParameter()
    Creates a `StartParameter` with default values. This is roughly equivalent to running Gradle on the command-line with no arguments.

  - ### StartParameter

    protected StartParameter(org.gradle.initialization.BuildLayoutParameters layoutParameters)
    Creates a `StartParameter` initialized from the given `BuildLayoutParameters`.
    Since:
      7.0

- ## Method Details

  - ### getLogLevel

    public LogLevel getLogLevel()
    Returns the minimum logging level to use. All log messages with a lower log level are ignored. Defaults to `LogLevel.LIFECYCLE`.
    Specified by:
      `getLogLevel` in interface `LoggingConfiguration`

  - ### setLogLevel

    public void setLogLevel(LogLevel logLevel)
    Specifies the minimum logging level to use. All log messages with a lower log level are ignored.
    Specified by:
      `setLogLevel` in interface `LoggingConfiguration`

  - ### getShowStacktrace

    public ShowStacktrace getShowStacktrace()
    Returns the detail that should be included in stacktraces. Defaults to `ShowStacktrace.INTERNAL_EXCEPTIONS`.
    Specified by:
      `getShowStacktrace` in interface `LoggingConfiguration`

  - ### setShowStacktrace

    public void setShowStacktrace(ShowStacktrace showStacktrace)
    Sets the detail that should be included in stacktraces.
    Specified by:
      `setShowStacktrace` in interface `LoggingConfiguration`

  - ### getConsoleOutput

    public ConsoleOutput getConsoleOutput()
    Returns the style of logging output that should be written to the console. Defaults to `ConsoleOutput.Auto`
    Specified by:
      `getConsoleOutput` in interface `LoggingConfiguration`

  - ### getConsoleUnicodeSupport

    public ConsoleUnicodeSupport getConsoleUnicodeSupport()
    Returns the type of characters that should be written to the console. Defaults to `ConsoleUnicodeSupport.Auto`
    Specified by:
      `getConsoleUnicodeSupport` in interface `LoggingConfiguration`

  - ### setConsoleOutput

    public void setConsoleOutput(ConsoleOutput consoleOutput)
    Specifies the style of logging output that should be written to the console.
    Specified by:
      `setConsoleOutput` in interface `LoggingConfiguration`

  - ### setConsoleUnicodeSupport

    public void setConsoleUnicodeSupport(ConsoleUnicodeSupport unicodeSupport)
    Specifies the use of Unicode characters in the console output.
    Specified by:
      `setConsoleUnicodeSupport` in interface `LoggingConfiguration`

  - ### getWarningMode

    public WarningMode getWarningMode()
    Specifies which type of warnings should be written to the console.
    Specified by:
      `getWarningMode` in interface `LoggingConfiguration`

  - ### isInteractive

    public boolean isInteractive()
    Whether the build may prompt the user for input on the console. Defaults to `true`.
    Specified by:
      `isInteractive` in interface `LoggingConfiguration`

  - ### setInteractive

    public void setInteractive(boolean interactive)
    Sets whether the build may prompt the user for input on the console.
    Specified by:
      `setInteractive` in interface `LoggingConfiguration`

  - ### setWarningMode

    public void setWarningMode(WarningMode warningMode)
    Specifies which type of warnings should be written to the console.
    Specified by:
      `setWarningMode` in interface `LoggingConfiguration`

  - ### setProjectCacheDir

    public void setProjectCacheDir(@Nullable File projectCacheDir)
    Sets the project's cache location. Set to null to use the default location.

  - ### getProjectCacheDir

    public @Nullable File getProjectCacheDir()
    Returns the project's cache dir.

    Note that this directory is managed by Gradle, and it assumes full ownership of its contents. Plugins and build logic should not store or modify any files or directories within this cache directory.

    Returns:
      project's cache dir, or null if the default location is to be used.

  - ### newInstance

    public StartParameter newInstance()
    Duplicates this `StartParameter` instance.
    Returns:
      the new parameters.

  - ### prepareNewInstance

    protected StartParameter prepareNewInstance(StartParameter p)

  - ### newBuild

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

    Returns:
      The new parameters.

  - ### prepareNewBuild

    protected StartParameter prepareNewBuild(StartParameter p)

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### getTaskNames

    public List<String> getTaskNames()
    Returns the names of the tasks to execute in this build. When empty, the default tasks for the project will be executed. If `TaskExecutionRequest`s are set for this build then names from these task parameters are returned.

    Note that this will also return entries for each task ARGUMENT as well.>

    Returns:
      the names of the tasks to execute in this build. Never returns null.

  - ### setTaskNames

    public void setTaskNames(@Nullable Iterable<String> 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.

    Parameters:
      `taskNames` - the names of the tasks to execute in this build.

  - ### getTaskRequests

    public List<TaskExecutionRequest> getTaskRequests()
    Returns the tasks to execute in this build. When empty, the default tasks for the project will be executed.
    Returns:
      the tasks to execute in this build. Never returns null.

  - ### setTaskRequests

    public void setTaskRequests(Iterable<? extends TaskExecutionRequest> taskParameters)

    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.

    Parameters:
      `taskParameters` - the tasks to execute in this build.

  - ### getExcludedTaskNames

    public Set<String> getExcludedTaskNames()
    Returns the names of the tasks to be excluded from this build. When empty, no tasks are excluded from the build.
    Returns:
      The names of the excluded tasks. Returns an empty set if there are no such tasks.

  - ### setExcludedTaskNames

    public void setExcludedTaskNames(Iterable<String> excludedTaskNames)
    Sets the tasks to exclude from this build.
    Parameters:
      `excludedTaskNames` - The task names.

  - ### getCurrentDir

    public File getCurrentDir()
    Returns the directory to use to select the default project, and to search for the settings file.
    Returns:
      The current directory. Never returns null.

  - ### setCurrentDir

    public void setCurrentDir(@Nullable File currentDir)
    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.
    Parameters:
      `currentDir` - The directory. Set to null to use the default.

  - ### getProjectProperties

    public Map<String,String> getProjectProperties()
    Key-value map of project properties. These are derived from the command-line arguments (-P) and do not reflect the final project properties available. Changing these properties may be too late to impact the build configuration.
    Returns:
      map of properties

  - ### setProjectProperties

    public void setProjectProperties(Map<String,String> projectProperties)
    Sets the project properties. This completely replaces the map of project properties. Changing these properties may be too late to impact the build configuration.
    Parameters:
      `projectProperties` - new map of properties

  - ### getSystemPropertiesArgs

    public Map<String,String> getSystemPropertiesArgs()
    Key-value map of system properties. These are derived from the command-line arguments (-D) and do not reflect the final system properties available. Changing these properties may be too late to impact the build configuration.
    Returns:
      map of properties

  - ### setSystemPropertiesArgs

    public void setSystemPropertiesArgs(Map<String,String> systemPropertiesArgs)
    Sets the system properties. This completely replaces the map of system properties. Changing these properties may be too late to impact the build configuration.
    Parameters:
      `systemPropertiesArgs` - new map of properties

  - ### getGradleUserHomeDir

    public File getGradleUserHomeDir()
    Returns the directory to use as the user home directory.
    Returns:
      The home directory.

  - ### setGradleUserHomeDir

    public void setGradleUserHomeDir(@Nullable File gradleUserHomeDir)
    Sets the directory to use as the user home directory. Set to null to use the default directory.
    Parameters:
      `gradleUserHomeDir` - The home directory. May be null.

  - ### isBuildProjectDependencies

    public boolean isBuildProjectDependencies()
    Returns true if project dependencies are to be built, false if they should not be. The default is true.

  - ### setBuildProjectDependencies

    public StartParameter setBuildProjectDependencies(boolean build)
    Specifies whether project dependencies should be built. Defaults to true.
    Returns:
      this

  - ### isDryRun

    public boolean isDryRun()
    Is the build running as a dry-run? Dry-run means task actions do not execute for the root build.
    Returns:
      true if the build is running as a dry-run

  - ### setDryRun

    public void setDryRun(boolean dryRun)
    Enables or disables dry-run.
    Parameters:
      `dryRun` - true if the build should run as a dry-run

  - ### addInitScript

    public void addInitScript(File initScriptFile)
    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.
    Parameters:
      `initScriptFile` - The init scripts.

  - ### setInitScripts

    public void setInitScripts(List<File> initScripts)
    Sets the list of init scripts to be run before the build starts. This list is in addition to the default init scripts.
    Parameters:
      `initScripts` - The init scripts.

  - ### getInitScripts

    public List<File> getInitScripts()
    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.
    Returns:
      list of all explicitly added init scripts.

  - ### getAllInitScripts

    public List<File> getAllInitScripts()
    Returns all init scripts, including explicit init scripts and implicit init scripts.
    Returns:
      All init scripts, including explicit init scripts and implicit init scripts.

  - ### setProjectDir

    public void setProjectDir(@Nullable File projectDir)
    Sets the project directory to use to select the default project. Use null to use the default criteria for selecting the default project.
    Parameters:
      `projectDir` - The project directory. May be null.

  - ### getProjectDir

    public @Nullable File getProjectDir()
    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
    Returns:
      The project dir. May be null.

  - ### setProfile

    public void setProfile(boolean profile)
    Specifies if a profile report should be generated.
    Parameters:
      `profile` - true if a profile report should be generated

  - ### isProfile

    public boolean isProfile()
    Returns true if a profile report will be generated.

  - ### isContinueOnFailure

    public boolean isContinueOnFailure()
    Specifies whether the build should continue on task failure. The default is false.

  - ### setContinueOnFailure

    public void setContinueOnFailure(boolean continueOnFailure)
    Specifies whether the build should continue on task failure. The default is false.

  - ### isOffline

    public boolean isOffline()
    Specifies whether the build should be performed offline (ie without network access).

  - ### setOffline

    public void setOffline(boolean offline)
    Specifies whether the build should be performed offline (ie without network access).

  - ### isRefreshDependencies

    public boolean isRefreshDependencies()
    Specifies whether the dependencies should be refreshed..

  - ### setRefreshDependencies

    public void setRefreshDependencies(boolean refreshDependencies)
    Specifies whether the dependencies should be refreshed..

  - ### isRerunTasks

    public boolean isRerunTasks()
    Specifies whether the cached task results should be ignored and each task should be forced to be executed.

  - ### setRerunTasks

    public void setRerunTasks(boolean rerunTasks)
    Specifies whether the cached task results should be ignored and each task should be forced to be executed.

  - ### isTaskGraph

    public boolean isTaskGraph()
    Specifies whether the task graph should be printed.
    Since:
      9.1.0

  - ### setTaskGraph

    public void setTaskGraph(boolean taskGraph)
    Specifies whether the task graph should be printed.
    Since:
      9.1.0

  - ### isParallelProjectExecutionEnabled

    public boolean isParallelProjectExecutionEnabled()
    Returns true if parallel project execution is enabled.
    Specified by:
      `isParallelProjectExecutionEnabled` in interface `ParallelismConfiguration`
    See Also:
      - `ParallelismConfiguration.getMaxWorkerCount()`

  - ### setParallelProjectExecutionEnabled

    public void setParallelProjectExecutionEnabled(boolean parallelProjectExecution)
    Enables/disables parallel project execution.
    Specified by:
      `setParallelProjectExecutionEnabled` in interface `ParallelismConfiguration`
    See Also:
      - `ParallelismConfiguration.isParallelProjectExecutionEnabled()`

  - ### isBuildCacheEnabled

    public boolean isBuildCacheEnabled()
    Returns true if the build cache is enabled.
    Since:
      3.5

  - ### setBuildCacheEnabled

    public void setBuildCacheEnabled(boolean buildCacheEnabled)
    Enables/disables the build cache.
    Since:
      3.5

  - ### isBuildCacheDebugLogging

    public boolean isBuildCacheDebugLogging()
    Whether build cache debug logging is enabled.
    Since:
      4.6

  - ### setBuildCacheDebugLogging

    public void setBuildCacheDebugLogging(boolean buildCacheDebugLogging)
    Whether build cache debug logging is enabled.
    Since:
      4.6

  - ### getMaxWorkerCount

    public int getMaxWorkerCount()
    Returns the maximum number of concurrent workers used for underlying build operations. Workers can be threads, processes or whatever Gradle considers a "worker". Some examples:
    - A thread running a task
    - A test process
    - A language compiler in a forked process
    Defaults to the number of processors available to the Java virtual machine.
    Specified by:
      `getMaxWorkerCount` in interface `ParallelismConfiguration`
    Returns:
      maximum number of concurrent workers, always >= 1.
    See Also:
      - `Runtime.availableProcessors()`

  - ### setMaxWorkerCount

    public void setMaxWorkerCount(int maxWorkerCount)
    Specifies the maximum number of concurrent workers used for underlying build operations.
    Specified by:
      `setMaxWorkerCount` in interface `ParallelismConfiguration`
    See Also:
      - `ParallelismConfiguration.getMaxWorkerCount()`

  - ### isConfigureOnDemand

    @Incubating public boolean isConfigureOnDemand()
    If the configure-on-demand mode is active

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### setGradleHomeDir

    void setGradleHomeDir(File gradleHomeDir)
    Package scope for testing purposes.

  - ### setConfigureOnDemand

    @Incubating public void setConfigureOnDemand(boolean configureOnDemand)

  - ### isContinuous

    public boolean isContinuous()

  - ### setContinuous

    public void setContinuous(boolean enabled)

  - ### includeBuild

    public void includeBuild(File includedBuild)

  - ### setIncludedBuilds

    public void setIncludedBuilds(List<File> includedBuilds)

  - ### getIncludedBuilds

    public List<File> getIncludedBuilds()

  - ### isBuildScan

    public boolean isBuildScan()
    Returns true if a Build Scan should be created.
    Since:
      3.4

  - ### setBuildScan

    public void setBuildScan(boolean buildScan)
    Specifies whether a Build Scan should be created.
    Since:
      3.4

  - ### isNoBuildScan

    public boolean isNoBuildScan()
    Returns true when Build Scan creation is explicitly disabled.
    Since:
      3.4

  - ### setNoBuildScan

    public void setNoBuildScan(boolean noBuildScan)
    Specifies whether Build Scan creation is explicitly disabled.
    Since:
      3.4

  - ### setWriteDependencyLocks

    public void setWriteDependencyLocks(boolean writeDependencyLocks)
    Specifies whether dependency resolution needs to be persisted for locking
    Since:
      4.8

  - ### isWriteDependencyLocks

    public boolean isWriteDependencyLocks()
    Returns true when dependency resolution is to be persisted for locking
    Since:
      4.8

  - ### setLockedDependenciesToUpdate

    public void setLockedDependenciesToUpdate(List<String> lockedDependenciesToUpdate)
    Indicates that specified dependencies are to be allowed to update their version. Implicitly activates dependency locking persistence.
    Parameters:
      `lockedDependenciesToUpdate` - the modules to update
    Since:
      4.8
    See Also:
      - `isWriteDependencyLocks()`

  - ### getWriteDependencyVerifications

    public List<String> getWriteDependencyVerifications()
    Indicates if a dependency verification metadata file should be written at the end of this build. If the list is not empty, then it means we need to generate or update the dependency verification file with the checksums specified in the list.
    Since:
      6.1

  - ### setWriteDependencyVerifications

    public void setWriteDependencyVerifications(List<String> checksums)
    Tells if a dependency verification metadata file should be written at the end of this build.
    Parameters:
      `checksums` - the list of checksums to generate
    Since:
      6.1

  - ### getLockedDependenciesToUpdate

    public List<String> getLockedDependenciesToUpdate()
    Returns the list of modules that are to be allowed to update their version compared to the lockfile.
    Returns:
      a list of modules allowed to have a version update
    Since:
      4.8

  - ### setDependencyVerificationMode

    public void setDependencyVerificationMode(DependencyVerificationMode verificationMode)
    Sets the dependency verification mode. There are three different modes:
    - strict, the default, verification is enabled as soon as a dependency verification file is present.
    - lenient, in this mode, failure to verify a checksum, missing checksums or signatures will be logged but will not fail the build. This mode should only be used when updating dependencies as it is inherently unsafe.
    - off, this mode disables all verifications
    Parameters:
      `verificationMode` - the verification mode to use
    Since:
      6.2

  - ### getDependencyVerificationMode

    public DependencyVerificationMode getDependencyVerificationMode()
    Returns the dependency verification mode.
    Since:
      6.2

  - ### setRefreshKeys

    public void setRefreshKeys(boolean refresh)
    Sets the key refresh flag.
    Parameters:
      `refresh` - If set to true, missing keys will be checked again. By default missing keys are cached for 24 hours.
    Since:
      6.2

  - ### isRefreshKeys

    public boolean isRefreshKeys()
    If true, Gradle will try to download missing keys again.
    Since:
      6.2

  - ### isExportKeys

    public boolean isExportKeys()
    If true, after writing the dependency verification file, a public keyring file will be generated with all keys seen during generation of the file. This file can then be used as a source for public keys instead of reaching out public key servers.
    Returns:
      true if keys should be exported
    Since:
      6.2

  - ### setExportKeys

    public void setExportKeys(boolean exportKeys)
    If true, after writing the dependency verification file, a public keyring file will be generated with all keys seen during generation of the file. This file can then be used as a source for public keys instead of reaching out public key servers.
    Parameters:
      `exportKeys` - set to true if keys should be exported
    Since:
      6.2

  - ### getWelcomeMessageConfiguration

    @Incubating public WelcomeMessageConfiguration getWelcomeMessageConfiguration()
    Returns when to display a welcome message on the command line.
    Returns:
      The welcome message configuration.
    Since:
      7.5
    See Also:
      - `WelcomeMessageDisplayMode`

  - ### setWelcomeMessageConfiguration

    @Incubating public void setWelcomeMessageConfiguration(WelcomeMessageConfiguration welcomeMessageConfiguration)
    Updates when to display a welcome message on the command line.
    Parameters:
      `welcomeMessageConfiguration` - The welcome message configuration.
    Since:
      7.5
    See Also:
      - `WelcomeMessageDisplayMode`

  - ### isConfigurationCacheRequested

    @Incubating @Deprecated public boolean isConfigurationCacheRequested()
    Deprecated.
    Use `Configuration Cache build feature` instead.
    Returns true if configuration caching has been requested. Note that the configuration cache may not necessarily be used even when requested, for example it may be disabled due to the presence of configuration cache problems. It is also currently not used during an IDE import/sync.
    Since:
      7.6