use of org.gradle.plugins.ide.internal.IdeDependenciesExtractor in project gradle by gradle.
the class WtpClasspathAttributeSupport method collectFilesFromConfigs.
private static Set<File> collectFilesFromConfigs(Set<Configuration> configs, Set<Configuration> minusConfigs) {
Set<File> resultFiles = Sets.newHashSet();
IdeDependenciesExtractor extractor = new IdeDependenciesExtractor();
Collection<IdeExtendedRepoFileDependency> dependencies = extractor.resolvedExternalDependencies(configs, minusConfigs);
for (IdeExtendedRepoFileDependency dependency : dependencies) {
resultFiles.add(dependency.getFile());
}
Collection<IdeLocalFileDependency> localDependencies = extractor.extractLocalFileDependencies(configs, minusConfigs);
for (IdeLocalFileDependency dependency : localDependencies) {
resultFiles.add(dependency.getFile());
}
return resultFiles;
}
use of org.gradle.plugins.ide.internal.IdeDependenciesExtractor in project gradle by gradle.
the class WtpComponentFactory method getEntriesFromLibraries.
private List<WbDependentModule> getEntriesFromLibraries(Set<Configuration> plusConfigurations, Set<Configuration> minusConfigurations, EclipseWtpComponent wtp, String deployPath) {
IdeDependenciesExtractor extractor = new IdeDependenciesExtractor();
//below is not perfect because we're skipping the unresolved dependencies completely
//however, it should be better anyway. Sometime soon we will hopefully change the wtp component stuff
Collection<IdeExtendedRepoFileDependency> externals = extractor.resolvedExternalDependencies(plusConfigurations, minusConfigurations);
Collection<IdeLocalFileDependency> locals = extractor.extractLocalFileDependencies(plusConfigurations, minusConfigurations);
Collection<File> libFiles = Lists.newArrayList();
for (IdeExtendedRepoFileDependency dependency : externals) {
libFiles.add(dependency.getFile());
}
for (IdeLocalFileDependency dependency : locals) {
libFiles.add(dependency.getFile());
}
List<WbDependentModule> libraryEntries = Lists.newArrayList();
for (File file : libFiles) {
libraryEntries.add(createWbDependentModuleEntry(file, wtp.getFileReferenceFactory(), deployPath));
}
return libraryEntries;
}
use of org.gradle.plugins.ide.internal.IdeDependenciesExtractor in project gradle by gradle.
the class WtpComponentFactory method getEntriesFromProjectDependencies.
private List<WbDependentModule> getEntriesFromProjectDependencies(Project project, Set<Configuration> plusConfigurations, Set<Configuration> minusConfigurations, String deployPath) {
IdeDependenciesExtractor extractor = new IdeDependenciesExtractor();
Collection<IdeProjectDependency> dependencies = extractor.extractProjectDependencies(project, plusConfigurations, minusConfigurations);
List<WbDependentModule> projectDependencies = Lists.newArrayList();
for (IdeProjectDependency dependency : dependencies) {
String moduleName = determineProjectName(dependency);
projectDependencies.add(new WbDependentModule(deployPath, "module:/resource/" + moduleName + "/" + moduleName));
}
return projectDependencies;
}
Aggregations