Search in sources :

Example 1 with InternalBuildProgressListener

use of org.gradle.tooling.internal.protocol.InternalBuildProgressListener in project gradle by gradle.

the class LazyConsumerActionExecutor method run.

public <T> T run(ConsumerAction<T> action) throws UnsupportedOperationException, IllegalStateException {
    try {
        ConsumerOperationParameters parameters = action.getParameters();
        BuildCancellationToken cancellationToken = parameters.getCancellationToken();
        InternalBuildProgressListener buildProgressListener = parameters.getBuildProgressListener();
        ConsumerConnection connection = onStartAction(cancellationToken, buildProgressListener);
        return action.run(connection);
    } finally {
        onEndAction();
    }
}
Also used : InternalBuildProgressListener(org.gradle.tooling.internal.protocol.InternalBuildProgressListener) ConsumerOperationParameters(org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters) BuildCancellationToken(org.gradle.initialization.BuildCancellationToken)

Aggregations

BuildCancellationToken (org.gradle.initialization.BuildCancellationToken)1 ConsumerOperationParameters (org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters)1 InternalBuildProgressListener (org.gradle.tooling.internal.protocol.InternalBuildProgressListener)1