# ExecSpec

interface ExecSpec : BaseExecSpec(source)

Specified the options for executing some command.

#### 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.
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(): ListProperty<String>
Returns the arguments for the command to be executed.
getArgumentProviders
Link copied to clipboard
abstract fun getArgumentProviders(): ListProperty<CommandLineArgumentProvider>
Argument providers for the application.
getCommandLine
Link copied to clipboard
abstract fun getCommandLine(): Provider<List<String>>
Returns the full command line, including the executable plus its arguments.
getEnvironment
Link copied to clipboard
abstract fun getEnvironment(): MapProperty<String, Any>
The environment variables to use for the process.
getErrorOutput
Link copied to clipboard
abstract fun getErrorOutput(): Property<OutputStream>
Returns the output stream to consume standard error from the process executing the command.
getExecutable
Link copied to clipboard
abstract fun getExecutable(): Property<String>
Returns the name of the executable to use.
getIgnoreExitValue
Link copied to clipboard
abstract fun getIgnoreExitValue(): Property<Boolean>
Tells whether a non-zero exit value is ignored, or an exception thrown.
getIsIgnoreExitValue
Link copied to clipboard
open fun getIsIgnoreExitValue(): Property<Boolean>
Added for Kotlin DSL source compatibility.
getStandardInput
Link copied to clipboard
abstract fun getStandardInput(): Property<InputStream>
Returns the standard input stream for the process executing the command.
getStandardOutput
Link copied to clipboard
abstract fun getStandardOutput(): Property<OutputStream>
Returns the output stream to consume standard output from the process executing the command.
getWorkingDir
Link copied to clipboard
abstract fun getWorkingDir(): DirectoryProperty
Returns the working directory for the process.
workingDir
Link copied to clipboard
abstract fun workingDir(dir: Any): ProcessForkOptions
Sets the working directory for the process.