use of org.gradle.api.execution.internal.ExecuteTaskBuildOperationDetails in project gradle by gradle.
the class ClientForwardingTaskOperationListener method finished.
@Override
public void finished(BuildOperationDescriptor buildOperation, OperationFinishEvent finishEvent) {
if (skipEvents.remove(buildOperation.getId())) {
return;
}
if (buildOperation.getDetails() instanceof ExecuteTaskBuildOperationDetails) {
Task task = ((ExecuteTaskBuildOperationDetails) buildOperation.getDetails()).getTask();
TaskInternal taskInternal = (TaskInternal) task;
eventConsumer.dispatch(new DefaultTaskFinishedProgressEvent(finishEvent.getEndTime(), toTaskDescriptor(buildOperation, taskInternal), toTaskResult(taskInternal, finishEvent)));
} else {
delegate.finished(buildOperation, finishEvent);
}
}
use of org.gradle.api.execution.internal.ExecuteTaskBuildOperationDetails in project gradle by gradle.
the class ClientForwardingTestOperationListener method started.
@Override
public void started(BuildOperationDescriptor buildOperation, OperationStartEvent startEvent) {
Object details = buildOperation.getDetails();
if (details instanceof ExecuteTaskBuildOperationDetails) {
Task task = ((ExecuteTaskBuildOperationDetails) details).getTask();
if (!(task instanceof Test)) {
return;
}
runningTasks.put(buildOperation.getId(), task.getPath());
} else if (details instanceof ExecuteTestBuildOperationType.Details) {
ExecuteTestBuildOperationType.Details testOperationDetails = (ExecuteTestBuildOperationType.Details) details;
TestDescriptorInternal testDescriptor = (TestDescriptorInternal) testOperationDetails.getTestDescriptor();
eventConsumer.dispatch(new DefaultTestStartedProgressEvent(testOperationDetails.getStartTime(), adapt(testDescriptor)));
}
}
use of org.gradle.api.execution.internal.ExecuteTaskBuildOperationDetails in project gradle by gradle.
the class TestExecutionResultEvaluator method started.
@Override
public void started(BuildOperationDescriptor buildOperation, OperationStartEvent startEvent) {
if (buildOperation.getDetails() instanceof ExecuteTaskBuildOperationDetails) {
Task task = ((ExecuteTaskBuildOperationDetails) buildOperation.getDetails()).getTask();
runningTasks.put(buildOperation.getId(), task.getPath());
}
}
use of org.gradle.api.execution.internal.ExecuteTaskBuildOperationDetails in project gradle by gradle.
the class ClientForwardingTaskOperationListener method started.
@Override
public void started(BuildOperationDescriptor buildOperation, OperationStartEvent startEvent) {
OperationIdentifier parentId = buildOperation.getParentId();
if (parentId != null && skipEvents.contains(parentId)) {
skipEvents.add(buildOperation.getId());
return;
}
if (buildOperation.getDetails() instanceof ExecuteTaskBuildOperationDetails) {
if (clientSubscriptions.isSendTaskProgressEvents()) {
Task task = ((ExecuteTaskBuildOperationDetails) buildOperation.getDetails()).getTask();
eventConsumer.dispatch(new DefaultTaskStartedProgressEvent(startEvent.getStartTime(), toTaskDescriptor(buildOperation, (TaskInternal) task)));
} else {
// Discard this operation and all children
skipEvents.add(buildOperation.getId());
}
} else {
delegate.started(buildOperation, startEvent);
}
}
Aggregations