api / org.gradle.process / ProcessForkOptions

ProcessForkOptions

interface ProcessForkOptions

Specifies the options to use to fork a process.

Functions

copyTo

abstract fun copyTo(options: ProcessForkOptions): ProcessForkOptions

Copies these options to the given target options.

environment

abstract fun environment(environmentVariables: MutableMap<String, *>): ProcessForkOptions

Adds some environment variables to the environment for this process.

abstract fun environment(name: String, value: Any): ProcessForkOptions

Adds an environment variable to the environment for this process.

executable

abstract fun executable(executable: Any): ProcessForkOptions

Sets the name of the executable to use.

getEnvironment

abstract fun getEnvironment(): MutableMap<String, Any>

The environment variables to use for the process. Defaults to the environment of this process.

getExecutable

abstract fun getExecutable(): String

Returns the name of the executable to use.

getWorkingDir

abstract fun getWorkingDir(): File

Returns the working directory for the process. Defaults to the project directory.

setEnvironment

abstract fun setEnvironment(environmentVariables: MutableMap<String, *>): Unit

Sets the environment variable to use for the process.

setExecutable

abstract fun setExecutable(executable: String): Unit
abstract fun setExecutable(executable: Any): Unit

Sets the name of the executable to use.

setWorkingDir

abstract fun setWorkingDir(dir: File): Unit

Sets the working directory for the process.

abstract fun setWorkingDir(dir: Any): Unit

Sets the working directory for the process. The supplied argument is evaluated as per .

workingDir

abstract fun workingDir(dir: Any): ProcessForkOptions

Sets the working directory for the process. The supplied argument is evaluated as per .

Inheritors

BaseExecSpec

interface BaseExecSpec : ProcessForkOptions

Specifies options for launching a child process.

JavaForkOptions

interface JavaForkOptions : ProcessForkOptions

Specifies the options to use to fork a Java process.