Search in sources :

Example 1 with BuildModelAction

use of org.gradle.tooling.internal.provider.BuildModelAction in project gradle by gradle.

the class BuildModelActionRunner method run.

@Override
public void run(BuildAction action, final BuildController buildController) {
    if (!(action instanceof BuildModelAction)) {
        return;
    }
    final BuildModelAction buildModelAction = (BuildModelAction) action;
    final GradleInternal gradle = buildController.getGradle();
    gradle.addBuildListener(new BuildResultAdapter(gradle, buildController, buildModelAction));
    if (buildModelAction.isRunTasks()) {
        buildController.run();
    } else {
        buildController.configure();
    }
}
Also used : GradleInternal(org.gradle.api.internal.GradleInternal) BuildModelAction(org.gradle.tooling.internal.provider.BuildModelAction)

Aggregations

GradleInternal (org.gradle.api.internal.GradleInternal)1 BuildModelAction (org.gradle.tooling.internal.provider.BuildModelAction)1