Search in sources :

Example 1 with BuildCacheHasher

use of org.gradle.caching.internal.BuildCacheHasher in project gradle by gradle.

the class DefaultClasspathHasher method hash.

@Override
public HashCode hash(ClassPath classpath) {
    FileCollectionSnapshot snapshot = snapshotter.snapshot(new SimpleFileCollection(classpath.getAsFiles()), TaskFilePropertyCompareStrategy.ORDERED, ClasspathSnapshotNormalizationStrategy.INSTANCE);
    BuildCacheHasher hasher = new DefaultBuildCacheHasher();
    snapshot.appendToHasher(hasher);
    return hasher.hash();
}
Also used : SimpleFileCollection(org.gradle.api.internal.file.collections.SimpleFileCollection) FileCollectionSnapshot(org.gradle.api.internal.changedetection.state.FileCollectionSnapshot) DefaultBuildCacheHasher(org.gradle.caching.internal.DefaultBuildCacheHasher) BuildCacheHasher(org.gradle.caching.internal.BuildCacheHasher) DefaultBuildCacheHasher(org.gradle.caching.internal.DefaultBuildCacheHasher)

Aggregations

FileCollectionSnapshot (org.gradle.api.internal.changedetection.state.FileCollectionSnapshot)1 SimpleFileCollection (org.gradle.api.internal.file.collections.SimpleFileCollection)1 BuildCacheHasher (org.gradle.caching.internal.BuildCacheHasher)1 DefaultBuildCacheHasher (org.gradle.caching.internal.DefaultBuildCacheHasher)1