api / org.gradle.tooling / BuildActionExecuter / Builder / buildFinished

buildFinished

abstract fun <T : Any> buildFinished(buildAction: BuildAction<T>, handler: IntermediateResultHandler<in T>): Builder

Executes the given action after tasks are run and sends its result to the given result handler.

If the operation fails, build will fail with the appropriate exception. Handler won't be notified in case of failure.

Parameters

buildAction - The action to run in the specified build phase.

handler - The handler to supply the result of the given action to.

- The returning type of the action.

Exceptions

IllegalArgumentException - If an action has already been added to this build phase. Multiple actions per phase are not supported yet.

Return
The builder.