Search in sources :

Example 1 with ShortCircuitTaskArtifactStateRepository

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));
}
Also used : ShortCircuitTaskArtifactStateRepository(org.gradle.api.internal.changedetection.changes.ShortCircuitTaskArtifactStateRepository) CacheBackedTaskHistoryRepository(org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository) TaskHistoryRepository(org.gradle.api.internal.changedetection.state.TaskHistoryRepository) OutputFilesSnapshotter(org.gradle.api.internal.changedetection.state.OutputFilesSnapshotter) DefaultSerializerRegistry(org.gradle.internal.serialize.DefaultSerializerRegistry) SerializerRegistry(org.gradle.internal.serialize.SerializerRegistry) CacheBackedTaskHistoryRepository(org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository) RandomLongIdGenerator(org.gradle.internal.id.RandomLongIdGenerator) DefaultSerializerRegistry(org.gradle.internal.serialize.DefaultSerializerRegistry) CacheBackedFileSnapshotRepository(org.gradle.api.internal.changedetection.state.CacheBackedFileSnapshotRepository) DefaultTaskArtifactStateRepository(org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository) DefaultGenericFileCollectionSnapshotter(org.gradle.api.internal.changedetection.state.DefaultGenericFileCollectionSnapshotter) FileCollectionSnapshotter(org.gradle.api.internal.changedetection.state.FileCollectionSnapshotter) GenericFileCollectionSnapshotter(org.gradle.api.internal.changedetection.state.GenericFileCollectionSnapshotter)

Aggregations

DefaultTaskArtifactStateRepository (org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository)1 ShortCircuitTaskArtifactStateRepository (org.gradle.api.internal.changedetection.changes.ShortCircuitTaskArtifactStateRepository)1 CacheBackedFileSnapshotRepository (org.gradle.api.internal.changedetection.state.CacheBackedFileSnapshotRepository)1 CacheBackedTaskHistoryRepository (org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository)1 DefaultGenericFileCollectionSnapshotter (org.gradle.api.internal.changedetection.state.DefaultGenericFileCollectionSnapshotter)1 FileCollectionSnapshotter (org.gradle.api.internal.changedetection.state.FileCollectionSnapshotter)1 GenericFileCollectionSnapshotter (org.gradle.api.internal.changedetection.state.GenericFileCollectionSnapshotter)1 OutputFilesSnapshotter (org.gradle.api.internal.changedetection.state.OutputFilesSnapshotter)1 TaskHistoryRepository (org.gradle.api.internal.changedetection.state.TaskHistoryRepository)1 RandomLongIdGenerator (org.gradle.internal.id.RandomLongIdGenerator)1 DefaultSerializerRegistry (org.gradle.internal.serialize.DefaultSerializerRegistry)1 SerializerRegistry (org.gradle.internal.serialize.SerializerRegistry)1