Search in sources :

Example 1 with ModuleLibrary

use of org.gradle.plugins.ide.idea.model.ModuleLibrary 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;
}
Also used : FilePath(org.gradle.plugins.ide.idea.model.FilePath) ModuleLibrary(org.gradle.plugins.ide.idea.model.ModuleLibrary) Dependency(org.gradle.plugins.ide.idea.model.Dependency) File(java.io.File)

Aggregations

File (java.io.File)1 Dependency (org.gradle.plugins.ide.idea.model.Dependency)1 FilePath (org.gradle.plugins.ide.idea.model.FilePath)1 ModuleLibrary (org.gradle.plugins.ide.idea.model.ModuleLibrary)1