use of org.gradle.api.artifacts.transform.ArtifactTransformException in project gradle by gradle.
the class DefaultVariantTransformRegistration method transform.
@Override
public List<File> transform(File input) {
try {
File absoluteFile = input.getAbsoluteFile();
// Collect up hash of the input files, and of the transform's configuration params and implementation
FileCollectionSnapshot snapshot = fileCollectionSnapshotter.snapshot(new SimpleFileCollection(absoluteFile), TaskFilePropertyCompareStrategy.UNORDERED, TaskFilePropertySnapshotNormalizationStrategy.ABSOLUTE);
DefaultBuildCacheHasher hasher = new DefaultBuildCacheHasher();
hasher.putBytes(inputsHash.asBytes());
snapshot.appendToHasher(hasher);
HashCode resultHash = hasher.hash();
return transformedFileCache.getResult(absoluteFile, resultHash, transformer);
} catch (Exception e) {
throw new ArtifactTransformException(input, to, implementation, e);
}
}
Aggregations