use of org.gradle.internal.fingerprint.FileCollectionFingerprint in project gradle by gradle.
the class DefaultPreviousExecutionStateSerializer method readFingerprints.
private ImmutableSortedMap<String, FileCollectionFingerprint> readFingerprints(Decoder decoder) throws Exception {
int count = decoder.readSmallInt();
ImmutableSortedMap.Builder<String, FileCollectionFingerprint> builder = ImmutableSortedMap.naturalOrder();
for (int fingerprintIdx = 0; fingerprintIdx < count; fingerprintIdx++) {
String property = decoder.readString();
FileCollectionFingerprint fingerprint = fileCollectionFingerprintSerializer.read(decoder);
builder.put(property, fingerprint);
}
return builder.build();
}
use of org.gradle.internal.fingerprint.FileCollectionFingerprint in project gradle by gradle.
the class DefaultInputFileChanges method accept.
@Override
public boolean accept(String propertyName, ChangeVisitor visitor) {
CurrentFileCollectionFingerprint currentFileCollectionFingerprint = current.get(propertyName);
FileCollectionFingerprint previousFileCollectionFingerprint = previous.get(propertyName);
FingerprintCompareStrategy compareStrategy = determineCompareStrategy(currentFileCollectionFingerprint);
return compareStrategy.visitChangesSince(previousFileCollectionFingerprint, currentFileCollectionFingerprint, TITLE, visitor);
}
use of org.gradle.internal.fingerprint.FileCollectionFingerprint in project gradle by gradle.
the class DefaultPreviousExecutionStateSerializer method read.
@Override
public PreviousExecutionState read(Decoder decoder) throws Exception {
OriginMetadata originMetadata = new OriginMetadata(decoder.readString(), Duration.ofMillis(decoder.readLong()));
ImplementationSnapshot taskImplementation = implementationSnapshotSerializer.read(decoder);
// We can't use an immutable list here because some hashes can be null
int taskActionsCount = decoder.readSmallInt();
ImmutableList.Builder<ImplementationSnapshot> taskActionImplementationsBuilder = ImmutableList.builder();
for (int j = 0; j < taskActionsCount; j++) {
ImplementationSnapshot actionImpl = implementationSnapshotSerializer.read(decoder);
taskActionImplementationsBuilder.add(actionImpl);
}
ImmutableList<ImplementationSnapshot> taskActionImplementations = taskActionImplementationsBuilder.build();
ImmutableSortedMap<String, ValueSnapshot> inputProperties = readInputProperties(decoder);
ImmutableSortedMap<String, FileCollectionFingerprint> inputFilesFingerprints = readFingerprints(decoder);
ImmutableSortedMap<String, FileSystemSnapshot> outputFilesSnapshots = readSnapshots(decoder);
boolean successful = decoder.readBoolean();
return new DefaultPreviousExecutionState(originMetadata, taskImplementation, taskActionImplementations, inputProperties, inputFilesFingerprints, outputFilesSnapshots, successful);
}
Aggregations