use of org.gradle.api.internal.changedetection.changes.ShortCircuitTaskArtifactStateRepository in project gradle by gradle.
the class TaskExecutionServices method createTaskArtifactStateRepository.
TaskArtifactStateRepository createTaskArtifactStateRepository(Instantiator instantiator, TaskHistoryStore cacheAccess, StartParameter startParameter, StringInterner stringInterner, FileCollectionFactory fileCollectionFactory, ClassLoaderHierarchyHasher classLoaderHierarchyHasher, FileCollectionSnapshotterRegistry fileCollectionSnapshotterRegistry, TaskCacheKeyCalculator cacheKeyCalculator, ValueSnapshotter valueSnapshotter) {
OutputFilesSnapshotter outputFilesSnapshotter = new OutputFilesSnapshotter();
SerializerRegistry serializerRegistry = new DefaultSerializerRegistry();
for (FileCollectionSnapshotter snapshotter : fileCollectionSnapshotterRegistry.getAllSnapshotters()) {
snapshotter.registerSerializers(serializerRegistry);
}
TaskHistoryRepository taskHistoryRepository = new CacheBackedTaskHistoryRepository(cacheAccess, new CacheBackedFileSnapshotRepository(cacheAccess, serializerRegistry.build(FileCollectionSnapshot.class), new RandomLongIdGenerator()), stringInterner);
return new ShortCircuitTaskArtifactStateRepository(startParameter, instantiator, new DefaultTaskArtifactStateRepository(taskHistoryRepository, instantiator, outputFilesSnapshotter, fileCollectionSnapshotterRegistry, fileCollectionFactory, classLoaderHierarchyHasher, cacheKeyCalculator, valueSnapshotter));
}
Aggregations