api / org.gradle.concurrent / ParallelismConfiguration

ParallelismConfiguration

@Incubating interface ParallelismConfiguration

A ParallelismConfiguration defines the parallel settings for a Gradle build.

Since
4.1

Functions

getMaxWorkerCount

abstract fun getMaxWorkerCount(): Int

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.

isParallelProjectExecutionEnabled

abstract fun isParallelProjectExecutionEnabled(): Boolean

Returns true if parallel project execution is enabled.

setMaxWorkerCount

abstract fun setMaxWorkerCount(maxWorkerCount: Int): Unit

Specifies the maximum number of concurrent workers used for underlying build operations.

setParallelProjectExecutionEnabled

abstract fun setParallelProjectExecutionEnabled(parallelProjectExecution: Boolean): Unit

Enables/disables parallel project execution.

Inheritors

StartParameter

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.