Search in sources :

Example 1 with FileSnapshottingPropertyAnnotationHandler

use of org.gradle.api.internal.project.taskfactory.FileSnapshottingPropertyAnnotationHandler in project gradle by gradle.

the class TaskExecutionServices method createFileCollectionSnapshotterRegistry.

FileCollectionSnapshotterRegistry createFileCollectionSnapshotterRegistry(ServiceRegistry serviceRegistry) {
    List<FileSnapshottingPropertyAnnotationHandler> handlers = serviceRegistry.getAll(FileSnapshottingPropertyAnnotationHandler.class);
    ImmutableList.Builder<FileCollectionSnapshotter> snapshotters = ImmutableList.builder();
    snapshotters.add(serviceRegistry.get(GenericFileCollectionSnapshotter.class));
    for (FileSnapshottingPropertyAnnotationHandler handler : handlers) {
        snapshotters.add(serviceRegistry.get(handler.getSnapshotterType()));
    }
    return new DefaultFileCollectionSnapshotterRegistry(snapshotters.build());
}
Also used : DefaultGenericFileCollectionSnapshotter(org.gradle.api.internal.changedetection.state.DefaultGenericFileCollectionSnapshotter) GenericFileCollectionSnapshotter(org.gradle.api.internal.changedetection.state.GenericFileCollectionSnapshotter) ImmutableList(com.google.common.collect.ImmutableList) FileSnapshottingPropertyAnnotationHandler(org.gradle.api.internal.project.taskfactory.FileSnapshottingPropertyAnnotationHandler) DefaultFileCollectionSnapshotterRegistry(org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotterRegistry) 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

ImmutableList (com.google.common.collect.ImmutableList)1 DefaultFileCollectionSnapshotterRegistry (org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotterRegistry)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 FileSnapshottingPropertyAnnotationHandler (org.gradle.api.internal.project.taskfactory.FileSnapshottingPropertyAnnotationHandler)1