# ExecSpec

interface ExecSpec : BaseExecSpec(source)

Specified the options for executing some command.

#### Since

0.9

#### Inheritors

AbstractExecTask

## Functions

args
Link copied to clipboard
abstract fun args(args: Iterable<out Any>): ExecSpec
abstract fun args(args: Array<Any>): ExecSpec
Adds arguments for the command to be executed.
commandLine
Link copied to clipboard
abstract fun commandLine(args: Iterable<out Any>): ExecSpec
abstract fun commandLine(args: Array<Any>): ExecSpec
Sets the full command line, including the executable to be executed plus its arguments.
copyTo
Link copied to clipboard
abstract fun copyTo(options: ProcessForkOptions): ProcessForkOptions
Copies these options to the given target options.
environment
Link copied to clipboard
abstract fun environment(environmentVariables: Map<String, out Any>): 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.
environment
Link copied to clipboard
inline fun ProcessForkOptions. environment(vararg environmentVariables: Pair<String, Any>): ProcessForkOptions

Kotlin extension function for org.gradle.process.ProcessForkOptions.environment.

executable
Link copied to clipboard
abstract fun executable(executable: Any): ProcessForkOptions
Sets the name of the executable to use.
getArgs
Link copied to clipboard
abstract fun getArgs(): List<String>
Returns the arguments for the command to be executed.
getArgumentProviders
Link copied to clipboard
abstract fun getArgumentProviders(): List<CommandLineArgumentProvider>
Argument providers for the application.
getCommandLine
Link copied to clipboard
abstract fun getCommandLine(): List<String>
Returns the full command line, including the executable plus its arguments.
getEnvironment
Link copied to clipboard
abstract fun getEnvironment(): Map<String, Any>
The environment variables to use for the process.
getErrorOutput
Link copied to clipboard
abstract fun getErrorOutput(): OutputStream
Returns the output stream to consume standard error from the process executing the command.
getExecutable
Link copied to clipboard
abstract fun getExecutable(): String
Returns the name of the executable to use.
getStandardInput
Link copied to clipboard
abstract fun getStandardInput(): InputStream
Returns the standard input stream for the process executing the command.
getStandardOutput
Link copied to clipboard
abstract fun getStandardOutput(): OutputStream
Returns the output stream to consume standard output from the process executing the command.
getWorkingDir
Link copied to clipboard
@ReplacedBy(value = "workingDirectory")
abstract fun getWorkingDir(): File
Returns the working directory for the process.
getWorkingDirectory
Link copied to clipboard
@Incubating
@Internal
abstract fun getWorkingDirectory(): DirectoryProperty
Returns the working directory for the process as a DirectoryProperty.
isIgnoreExitValue
Link copied to clipboard
abstract fun isIgnoreExitValue(): Boolean
Tells whether a non-zero exit value is ignored, or an exception thrown.
setArgs
Link copied to clipboard
abstract fun setArgs(args: Iterable<out Any>): ExecSpec
abstract fun setArgs(args: List<String>): ExecSpec
Sets the arguments for the command to be executed.
setCommandLine
Link copied to clipboard
abstract fun setCommandLine(args: Iterable<out Any>)
abstract fun setCommandLine(args: Array<Any>)
abstract fun setCommandLine(args: List<String>)
Sets the full command line, including the executable to be executed plus its arguments.
setEnvironment
Link copied to clipboard
abstract fun setEnvironment(environmentVariables: Map<String, out Any>)
Sets the environment variable to use for the process.
setEnvironment
Link copied to clipboard
inline fun ProcessForkOptions. setEnvironment(vararg environmentVariables: Pair<String, Any>)

Kotlin extension function for org.gradle.process.ProcessForkOptions.setEnvironment.

setErrorOutput
Link copied to clipboard
abstract fun setErrorOutput(outputStream: OutputStream): BaseExecSpec
Sets the output stream to consume standard error from the process executing the command.
setExecutable
Link copied to clipboard
abstract fun setExecutable(executable: Any)
abstract fun setExecutable(executable: String)
Sets the name of the executable to use.
setIgnoreExitValue
Link copied to clipboard
abstract fun setIgnoreExitValue(ignoreExitValue: Boolean): BaseExecSpec
Sets whether a non-zero exit value is ignored, or an exception thrown.
setStandardInput
Link copied to clipboard
abstract fun setStandardInput(inputStream: InputStream): BaseExecSpec
Sets the standard input stream for the process executing the command.
setStandardOutput
Link copied to clipboard
abstract fun setStandardOutput(outputStream: OutputStream): BaseExecSpec
Sets the output stream to consume standard output from the process executing the command.
setWorkingDir
Link copied to clipboard
abstract fun setWorkingDir(dir: File)
abstract fun setWorkingDir(dir: Any)
Sets the working directory for the process.
workingDir
Link copied to clipboard
abstract fun workingDir(dir: Any): ProcessForkOptions
Sets the working directory for the process.