use of org.gradle.initialization.BuildEventConsumer in project gradle by gradle.
the class SubscribableBuildActionRunner method registerListenersForClientSubscriptions.
private void registerListenersForClientSubscriptions(BuildClientSubscriptions clientSubscriptions, GradleInternal gradle) {
BuildEventConsumer eventConsumer = gradle.getServices().get(BuildEventConsumer.class);
if (clientSubscriptions.isSendTestProgressEvents()) {
registerListener(new ClientForwardingTestOperationListener(eventConsumer, clientSubscriptions));
}
if (!clientSubscriptions.isSendBuildProgressEvents() && !clientSubscriptions.isSendTaskProgressEvents()) {
return;
}
BuildOperationListener buildListener = NO_OP;
if (clientSubscriptions.isSendBuildProgressEvents()) {
buildListener = new ClientForwardingBuildOperationListener(eventConsumer);
}
buildListener = new ClientForwardingTaskOperationListener(eventConsumer, clientSubscriptions, buildListener);
registerListener(buildListener);
}
Aggregations