@Incubating public static interface BuildActionExecuter.Builder
A single BuildAction
is allowed per build phase. Use composite actions if needed.
Modifier and Type | Method | Description |
---|---|---|
BuildActionExecuter<Void> |
build() |
Builds the executer from the added actions.
|
<T> BuildActionExecuter.Builder |
buildFinished(BuildAction<T> buildAction,
IntermediateResultHandler<? super T> handler) |
Executes the given action after tasks are run and sends its result to the given result handler.
|
<T> BuildActionExecuter.Builder |
projectsLoaded(BuildAction<T> buildAction,
IntermediateResultHandler<? super T> handler) |
Executes the given action after projects are loaded and sends its result to the given result handler.
|
<T> BuildActionExecuter.Builder projectsLoaded(BuildAction<T> buildAction, IntermediateResultHandler<? super T> handler) throws IllegalArgumentException
Action will be executed after projects are loaded and Gradle will configure projects as necessary for the models requested.
If the operation fails, build will fail with the appropriate exception. Handler won't be notified in case of failure.
T
- The returning type of the action.buildAction
- The action to run in the specified build phase.handler
- The handler to supply the result of the given action to.IllegalArgumentException
- If an action has already been added to this build phase. Multiple actions per phase are not supported yet.<T> BuildActionExecuter.Builder buildFinished(BuildAction<T> buildAction, IntermediateResultHandler<? super T> handler) throws IllegalArgumentException
If the operation fails, build will fail with the appropriate exception. Handler won't be notified in case of failure.
T
- The returning type of the action.buildAction
- The action to run in the specified build phase.handler
- The handler to supply the result of the given action to.IllegalArgumentException
- If an action has already been added to this build phase. Multiple actions per phase are not supported yet.BuildActionExecuter<Void> build()