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

projectsLoaded

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

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. 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.