use of org.gradle.internal.watch.registry.FileWatcherUpdater in project gradle by gradle.
the class AbstractFileWatcherRegistryFactory method createFileWatcherRegistry.
@Override
public FileWatcherRegistry createFileWatcherRegistry(FileWatcherRegistry.ChangeHandler handler) {
BlockingQueue<FileWatchEvent> fileEvents = new ArrayBlockingQueue<>(FILE_EVENT_QUEUE_SIZE);
try {
// TODO How can we avoid hard-coding ".gradle" here?
FileWatcherProbeRegistry probeRegistry = new DefaultFileWatcherProbeRegistry(buildDir -> new File(new File(buildDir, ".gradle"), "file-system.probe"));
W watcher = createFileWatcher(fileEvents);
WatchableHierarchies watchableHierarchies = new WatchableHierarchies(probeRegistry, watchFilter);
FileWatcherUpdater fileWatcherUpdater = createFileWatcherUpdater(watcher, probeRegistry, watchableHierarchies);
return new DefaultFileWatcherRegistry(fileEventFunctions, watcher, handler, fileWatcherUpdater, fileEvents);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
Aggregations