Search in sources :

Example 1 with ExecutionStateChanges

use of org.gradle.internal.execution.history.changes.ExecutionStateChanges in project gradle by gradle.

the class ResolveInputChangesStep method determineInputChanges.

private static Optional<InputChangesInternal> determineInputChanges(UnitOfWork work, IncrementalChangesContext context) {
    if (!work.getInputChangeTrackingStrategy().requiresInputChanges()) {
        return Optional.empty();
    }
    ExecutionStateChanges changes = context.getChanges().orElseThrow(() -> new IllegalStateException("Changes are not tracked, unable determine incremental changes."));
    InputChangesInternal inputChanges = changes.createInputChanges();
    if (!inputChanges.isIncremental()) {
        LOGGER.info("The input changes require a full rebuild for incremental {}.", work.getDisplayName());
    }
    return Optional.of(inputChanges);
}
Also used : InputChangesInternal(org.gradle.internal.execution.history.changes.InputChangesInternal) ExecutionStateChanges(org.gradle.internal.execution.history.changes.ExecutionStateChanges)

Aggregations

ExecutionStateChanges (org.gradle.internal.execution.history.changes.ExecutionStateChanges)1 InputChangesInternal (org.gradle.internal.execution.history.changes.InputChangesInternal)1