use of org.gradle.internal.invocation.GradleBuildController in project gradle by gradle.
the class InProcessBuildActionExecuter method execute.
public Object execute(BuildAction action, BuildRequestContext buildRequestContext, BuildActionParameters actionParameters, ServiceRegistry contextServices) {
GradleLauncherFactory gradleLauncherFactory = contextServices.get(GradleLauncherFactory.class);
GradleLauncher gradleLauncher = gradleLauncherFactory.newInstance(action.getStartParameter(), buildRequestContext, contextServices);
GradleBuildController buildController = new GradleBuildController(gradleLauncher);
checkDeprecations(action.getStartParameter());
try {
RootBuildLifecycleListener buildLifecycleListener = contextServices.get(ListenerManager.class).getBroadcaster(RootBuildLifecycleListener.class);
buildLifecycleListener.afterStart();
try {
buildActionRunner.run(action, buildController);
return buildController.getResult();
} finally {
buildLifecycleListener.beforeComplete();
}
} finally {
buildController.stop();
}
}
Aggregations