Search in sources :

Example 1 with TaskOutputCachingState

use of org.gradle.api.internal.TaskOutputCachingState in project gradle by gradle.

the class ResolveTaskOutputCachingStateExecuter method execute.

@Override
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) {
    try {
        TaskOutputCachingState taskOutputCachingState = task.getOutputs().getCachingState();
        state.setTaskOutputCaching(taskOutputCachingState);
        if (!taskOutputCachingState.isEnabled()) {
            LOGGER.info("Caching disabled for {}: {}", task, taskOutputCachingState.getDisabledReason());
        }
    } catch (Exception t) {
        throw new GradleException(String.format("Could not evaluate TaskOutputs.getCachingState().isEnabled() for %s.", task), t);
    }
    delegate.execute(task, state, context);
}
Also used : TaskOutputCachingState(org.gradle.api.internal.TaskOutputCachingState) GradleException(org.gradle.api.GradleException) GradleException(org.gradle.api.GradleException)

Aggregations

GradleException (org.gradle.api.GradleException)1 TaskOutputCachingState (org.gradle.api.internal.TaskOutputCachingState)1