use of org.gradle.tooling.internal.provider.SubscribableBuildAction in project gradle by gradle.
the class SubscribableBuildActionRunner method run.
@Override
public void run(BuildAction action, BuildController buildController) {
if (!(action instanceof SubscribableBuildAction)) {
return;
}
GradleInternal gradle = buildController.getGradle();
SubscribableBuildAction subscribableBuildAction = (SubscribableBuildAction) action;
// register listeners that dispatch all progress via the registered BuildEventConsumer instance,
// this allows to send progress events back to the DaemonClient (via short-cut)
registerListenersForClientSubscriptions(subscribableBuildAction.getClientSubscriptions(), gradle);
try {
delegate.run(action, buildController);
} finally {
for (BuildOperationListener listener : listeners) {
buildOperationService.removeListener(listener);
}
}
}
Aggregations