use of org.gradle.internal.file.FileType in project gradle by gradle.
the class NormalizedPathFingerprintCompareStrategy method modified.
private static Change modified(String propertyTitle, FileType previousFingerprintType, String normalizedPath, FilePathWithType modifiedFile) {
String absolutePath = modifiedFile.getAbsolutePath();
FileType fileType = modifiedFile.getFileType();
return DefaultFileChange.modified(absolutePath, propertyTitle, previousFingerprintType, fileType, normalizedPath);
}
use of org.gradle.internal.file.FileType in project gradle by gradle.
the class FingerprintMapSerializer method readFingerprint.
private FileSystemLocationFingerprint readFingerprint(Decoder decoder) throws IOException {
FileType fileType = readFileType(decoder);
HashCode contentHash = readContentHash(fileType, decoder);
byte fingerprintKind = decoder.readByte();
switch(fingerprintKind) {
case DEFAULT_NORMALIZATION:
String normalizedPath = decoder.readString();
return new DefaultFileSystemLocationFingerprint(stringInterner.intern(normalizedPath), fileType, contentHash);
case IGNORED_PATH_NORMALIZATION:
return IgnoredPathFileSystemLocationFingerprint.create(fileType, contentHash);
default:
throw new RuntimeException("Unable to read serialized file fingerprint. Unrecognized value found in the data stream.");
}
}
Aggregations