use of org.gradle.internal.execution.history.PreviousExecutionState in project gradle by gradle.
the class LoadPreviousExecutionStateStep method execute.
@Override
public R execute(UnitOfWork work, C context) {
Identity identity = context.getIdentity();
Optional<PreviousExecutionState> previousExecutionState = context.getHistory().flatMap(history -> history.load(identity.getUniqueId()));
return delegate.execute(work, new PreviousExecutionContext() {
@Override
public Optional<PreviousExecutionState> getPreviousExecutionState() {
return previousExecutionState;
}
@Override
public Optional<String> getNonIncrementalReason() {
return context.getNonIncrementalReason();
}
@Override
public WorkValidationContext getValidationContext() {
return context.getValidationContext();
}
@Override
public ImmutableSortedMap<String, ValueSnapshot> getInputProperties() {
return context.getInputProperties();
}
@Override
public ImmutableSortedMap<String, CurrentFileCollectionFingerprint> getInputFileProperties() {
return context.getInputFileProperties();
}
@Override
public Identity getIdentity() {
return context.getIdentity();
}
@Override
public File getWorkspace() {
return context.getWorkspace();
}
@Override
public Optional<ExecutionHistoryStore> getHistory() {
return context.getHistory();
}
});
}
Aggregations