FileCollectionDependency (@NotNull SourceSetOutput sourceSetOutput) { List<File> runtimeOutputDirs = new ArrayList<>(sourceSetOutput.getDirs().getFiles()); if (!runtimeOutputDirs.isEmpty()) { DefaultFileCollectionDependency runtimeOutputDirsDependency = new DefaultFileCollectionDependency(runtimeOutputDirs); runtimeOutputDirsDependency.setScope(RUNTIME_SCOPE); runtimeOutputDirsDependency.setExcludedFromIndexing(true); return runtimeOutputDirsDependency; } return null; }