Search in sources :

Example 1 with DefaultTaskFinishedProgressEvent

use of org.gradle.tooling.internal.provider.events.DefaultTaskFinishedProgressEvent in project gradle by gradle.

the class ClientForwardingTaskOperationListener method finished.

@Override
public void finished(BuildOperationInternal buildOperation, OperationResult finishEvent) {
    if (skipEvents.remove(buildOperation.getId())) {
        return;
    }
    if (buildOperation.getOperationDescriptor() instanceof TaskOperationDescriptor) {
        TaskInternal task = ((TaskOperationDescriptor) buildOperation.getOperationDescriptor()).getTask();
        eventConsumer.dispatch(new DefaultTaskFinishedProgressEvent(finishEvent.getEndTime(), toTaskDescriptor(buildOperation, task), toTaskResult(task, finishEvent)));
    } else {
        delegate.finished(buildOperation, finishEvent);
    }
}
Also used : DefaultTaskFinishedProgressEvent(org.gradle.tooling.internal.provider.events.DefaultTaskFinishedProgressEvent) TaskInternal(org.gradle.api.internal.TaskInternal) TaskOperationDescriptor(org.gradle.api.execution.internal.TaskOperationDescriptor)

Aggregations

TaskOperationDescriptor (org.gradle.api.execution.internal.TaskOperationDescriptor)1 TaskInternal (org.gradle.api.internal.TaskInternal)1 DefaultTaskFinishedProgressEvent (org.gradle.tooling.internal.provider.events.DefaultTaskFinishedProgressEvent)1