# BuildActionExecuter

interface BuildActionExecuter<T> : ConfigurableLauncher<T> (source)

Used to execute a BuildAction in the build process.

#### Since

1.8

#### Parameters

<T>

The type of result produced by this executer.

## Types

Builder
Link copied to clipboard
interface Builder
Builder for a build action that hooks into different phases of the build.

## Functions

addArguments
Link copied to clipboard
abstract fun addArguments(arguments: Array<String>): T
abstract fun addArguments(arguments: Array<String>): LongRunningOperation
addJvmArguments
Link copied to clipboard
abstract fun addJvmArguments(jvmArguments: Array<String>): T
abstract fun addJvmArguments(jvmArguments: Array<String>): LongRunningOperation
addProgressListener
Link copied to clipboard
abstract fun addProgressListener(listener: ProgressListener): T
abstract fun addProgressListener(listener: ProgressListener): LongRunningOperation
forTasks
Link copied to clipboard
abstract fun forTasks(tasks: Iterable<String>): BuildActionExecuter<T>
abstract fun forTasks(tasks: Array<String>): BuildActionExecuter<T>
Specifies the tasks to execute before executing the BuildAction.
run
Link copied to clipboard
abstract fun run(): T
Runs the action, blocking until its result is available.
abstract fun run(handler: ResultHandler<in T>)
Starts executing the action, passing the result to the given handler when complete.
setColorOutput
Link copied to clipboard
abstract fun setColorOutput(colorOutput: Boolean): T
abstract fun setColorOutput(colorOutput: Boolean): LongRunningOperation
setEnvironmentVariables
Link copied to clipboard
abstract fun setEnvironmentVariables(envVariables: Map<String, String>): T
abstract fun setEnvironmentVariables(envVariables: @Nullable Map<String, String>): LongRunningOperation
setJavaHome
Link copied to clipboard
abstract fun setJavaHome(javaHome: File): T
abstract fun setJavaHome(javaHome: @Nullable File): LongRunningOperation
setJvmArguments
Link copied to clipboard
abstract fun setJvmArguments(jvmArguments: Array<String>): T
abstract fun setJvmArguments(jvmArguments: Array<@Nullable String>): LongRunningOperation
setStandardError
Link copied to clipboard
abstract fun setStandardError(outputStream: OutputStream): T
abstract fun setStandardError(outputStream: OutputStream): LongRunningOperation
setStandardInput
Link copied to clipboard
abstract fun setStandardInput(inputStream: InputStream): T
abstract fun setStandardInput(inputStream: InputStream): LongRunningOperation
setStandardOutput
Link copied to clipboard
abstract fun setStandardOutput(outputStream: OutputStream): T
abstract fun setStandardOutput(outputStream: OutputStream): LongRunningOperation
setStreamedValueListener
Link copied to clipboard
abstract fun setStreamedValueListener(listener: StreamedValueListener)
Sets the listener to use to streamed values sent from the action via send.
withArguments
Link copied to clipboard
abstract fun withArguments(arguments: Array<String>): T
abstract fun withArguments(arguments: Array<@Nullable String>): LongRunningOperation
withCancellationToken
Link copied to clipboard
abstract fun withCancellationToken(cancellationToken: CancellationToken): T
abstract fun withCancellationToken(cancellationToken: CancellationToken): LongRunningOperation
withDetailedFailure
Link copied to clipboard
abstract fun withDetailedFailure(): T
abstract fun withDetailedFailure(): LongRunningOperation
withSystemProperties
Link copied to clipboard
abstract fun withSystemProperties(systemProperties: Map<String, String>): T
abstract fun withSystemProperties(systemProperties: Map<String, String>): LongRunningOperation