use of org.gradle.tooling.internal.protocol.InternalPhasedAction in project gradle by gradle.
the class PhasedActionAwareConsumerConnection method run.
@Override
public void run(PhasedBuildAction phasedBuildAction, ConsumerOperationParameters operationParameters) {
InternalPhasedActionConnection connection = (InternalPhasedActionConnection) getDelegate();
PhasedActionResultListener listener = new DefaultPhasedActionResultListener(getHandler(phasedBuildAction.getProjectsLoadedAction()), getHandler(phasedBuildAction.getBuildFinishedAction()));
InternalPhasedAction internalPhasedAction = getPhasedAction(phasedBuildAction, operationParameters.getProjectDir(), getVersionDetails());
try {
connection.run(internalPhasedAction, listener, new BuildCancellationTokenAdapter(operationParameters.getCancellationToken()), operationParameters);
} catch (InternalBuildActionFailureException e) {
throw new BuildActionFailureException("The supplied phased action failed with an exception.", e.getCause());
}
}
use of org.gradle.tooling.internal.protocol.InternalPhasedAction in project gradle by gradle.
the class ClientProvidedPhasedActionRunner method run.
@Override
public Result run(BuildAction action, BuildTreeLifecycleController buildController) {
if (!(action instanceof ClientProvidedPhasedAction)) {
return Result.nothing();
}
ClientProvidedPhasedAction clientProvidedPhasedAction = (ClientProvidedPhasedAction) action;
InternalPhasedAction phasedAction = (InternalPhasedAction) payloadSerializer.deserialize(clientProvidedPhasedAction.getPhasedAction());
return runClientAction(new ClientActionImpl(phasedAction, action), buildController);
}
Aggregations