Schnittstelle BuildActionExecuter.Builder

Umschließende Schnittstelle:
BuildActionExecuter<T>

public static interface BuildActionExecuter.Builder
Builder for a build action that hooks into different phases of the build.

A single BuildAction is allowed per build phase. Use composite actions if needed.

Seit:
4.8
  • Methodendetails

    • projectsLoaded

      <T> BuildActionExecuter.Builder projectsLoaded(BuildAction<T> buildAction, IntermediateResultHandler<? super T> handler) throws IllegalArgumentException
      Executes the given action after projects are loaded and sends its result to the given result handler.

      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. The handler won't be notified in case of failure.

      Typparameter:
      T - The returning type of the action.
      Parameter:
      buildAction - The action to run in the specified build phase.
      handler - The handler to supply the result of the given action to.
      Gibt zurück:
      The builder.
      Löst aus:
      IllegalArgumentException - If an action has already been added to this build phase. Multiple actions per phase are not supported yet.
    • buildFinished

      <T> BuildActionExecuter.Builder buildFinished(BuildAction<T> buildAction, IntermediateResultHandler<? super T> handler) throws IllegalArgumentException
      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. The handler won't be notified in case of failure.

      Typparameter:
      T - The returning type of the action.
      Parameter:
      buildAction - The action to run in the specified build phase.
      handler - The handler to supply the result of the given action to.
      Gibt zurück:
      The builder.
      Löst aus:
      IllegalArgumentException - If an action has already been added to this build phase. Multiple actions per phase are not supported yet.
    • build

      Builds the executer from the added actions.
      Gibt zurück:
      The executer.