Search in sources :

Example 1 with BuildEventConsumer

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);
}
Also used : BuildEventConsumer(org.gradle.initialization.BuildEventConsumer) BuildOperationListener(org.gradle.internal.progress.BuildOperationListener)

Aggregations

BuildEventConsumer (org.gradle.initialization.BuildEventConsumer)1 BuildOperationListener (org.gradle.internal.progress.BuildOperationListener)1