use of org.gradle.api.internal.tasks.InputChangesAwareTaskAction in project gradle by gradle.
the class TaskExecution method executeActions.
private void executeActions(TaskInternal task, @Nullable InputChangesInternal inputChanges) {
boolean hasTaskListener = listenerManager.hasListeners(org.gradle.api.execution.TaskActionListener.class) || listenerManager.hasListeners(org.gradle.api.execution.TaskExecutionListener.class);
Iterator<InputChangesAwareTaskAction> actions = new ArrayList<>(task.getTaskActions()).iterator();
while (actions.hasNext()) {
InputChangesAwareTaskAction action = actions.next();
task.getState().setDidWork(true);
task.getStandardOutputCapture().start();
boolean hasMoreWork = hasTaskListener || actions.hasNext();
try {
executeAction(action.getDisplayName(), task, action, inputChanges, hasMoreWork);
} catch (StopActionException e) {
// Ignore
LOGGER.debug("Action stopped by some action with message: {}", e.getMessage());
} catch (StopExecutionException e) {
LOGGER.info("Execution stopped by some action with message: {}", e.getMessage());
break;
} finally {
task.getStandardOutputCapture().stop();
}
}
}
use of org.gradle.api.internal.tasks.InputChangesAwareTaskAction in project gradle by gradle.
the class TaskExecution method visitImplementations.
@Override
public void visitImplementations(ImplementationVisitor visitor) {
visitor.visitImplementation(task.getClass());
List<InputChangesAwareTaskAction> taskActions = task.getTaskActions();
for (InputChangesAwareTaskAction taskAction : taskActions) {
visitor.visitImplementation(taskAction.getActionImplementation(classLoaderHierarchyHasher));
}
}
Aggregations