use of org.gradle.plugins.ide.idea.model.FilePath in project gradle by gradle.
the class IdeaDependenciesProvider method toLibraryDependency.
private SingleEntryModuleLibrary toLibraryDependency(IdeExtendedRepoFileDependency dependency, IdeaModule ideaModule, GeneratedIdeaScope scope) {
Set<FilePath> javadoc = Sets.newLinkedHashSet();
for (File javaDocFile : dependency.getJavadocFiles()) {
javadoc.add(toPath(ideaModule, javaDocFile));
}
Set<FilePath> source = Sets.newLinkedHashSet();
for (File sourceFile : dependency.getSourceFiles()) {
source.add(toPath(ideaModule, sourceFile));
}
SingleEntryModuleLibrary library = new SingleEntryModuleLibrary(toPath(ideaModule, dependency.getFile()), javadoc, source, scope.name());
library.setModuleVersion(dependency.getId());
return library;
}
use of org.gradle.plugins.ide.idea.model.FilePath in project gradle by gradle.
the class IdeaScalaConfigurer method getIdeaModuleLibraryDependenciesAsFiles.
private static Iterable<File> getIdeaModuleLibraryDependenciesAsFiles(IdeaModule ideaModule) {
// could make resolveDependencies() cache its result for later use by GenerateIdeaModule
Set<Dependency> dependencies = ideaModule.resolveDependencies();
List<File> files = Lists.newArrayList();
for (ModuleLibrary moduleLibrary : Iterables.filter(dependencies, ModuleLibrary.class)) {
for (FilePath filePath : Iterables.filter(moduleLibrary.getClasses(), FilePath.class)) {
files.add(filePath.getFile());
}
}
return files;
}
Aggregations