WorkerConfiguration

API Documentation:WorkerConfiguration

Note: This class is incubating and may change in a future version of Gradle.

Represents the configuration of a worker. Used when submitting an item of work to the WorkerExecutor.

workerExecutor.submit(RunnableWorkImpl.class) { WorkerConfiguration conf ->
    conf.isolationMode = IsolationMode.PROCESS

    forkOptions { JavaForkOptions options ->
        options.maxHeapSize = "512m"
        options.systemProperty 'some.prop', 'value'
        options.jvmArgs "-server"
    }

    classpath configurations.fooLibrary

    conf.params = [ "foo", file('bar') ]
}

Properties

No properties

Methods

MethodDescription
classpath(files)
Incubating

Adds a set of files to the classpath associated with the worker.

forkOptions(forkOptionsAction)
Incubating

Executes the provided action against the JavaForkOptions object associated with this builder.

getClasspath()
Incubating

Gets the classpath associated with the worker.

getIsolationMode()
Incubating

Gets the isolation mode for this worker, see IsolationMode.

setClasspath(files)
Incubating

Sets the classpath associated with the worker.

setDisplayName(displayName)
Incubating

Sets the name to use when displaying this item of work.

setIsolationMode(isolationMode)
Incubating

Sets the isolation mode for this worker, see IsolationMode.

Script blocks

No script blocks

Method details

void classpath(Iterable<File> files)

Note: This method is incubating and may change in a future version of Gradle.

Adds a set of files to the classpath associated with the worker.

void forkOptions(Action<? super JavaForkOptions> forkOptionsAction)

Note: This method is incubating and may change in a future version of Gradle.

Executes the provided action against the JavaForkOptions object associated with this builder.

Iterable<File> getClasspath()

Note: This method is incubating and may change in a future version of Gradle.

Gets the classpath associated with the worker.

IsolationMode getIsolationMode()

Note: This method is incubating and may change in a future version of Gradle.

Gets the isolation mode for this worker, see IsolationMode.

void setClasspath(Iterable<File> files)

Note: This method is incubating and may change in a future version of Gradle.

Sets the classpath associated with the worker.

void setDisplayName(String displayName)

Note: This method is incubating and may change in a future version of Gradle.

Sets the name to use when displaying this item of work.

void setIsolationMode(IsolationMode isolationMode)

Note: This method is incubating and may change in a future version of Gradle.

Sets the isolation mode for this worker, see IsolationMode.