use of org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency in project gradle by gradle.
the class IdeaDependenciesProvider method getProjectDependencies.
private Set<Dependency> getProjectDependencies(IdeaModule ideaModule, GeneratedIdeaScope scope) {
Collection<Configuration> plusConfigurations = getPlusConfigurations(ideaModule, scope);
Collection<Configuration> minusConfigurations = getMinusConfigurations(ideaModule, scope);
Collection<IdeProjectDependency> extractedDependencies = dependenciesExtractor.extractProjectDependencies(ideaModule.getProject(), plusConfigurations, minusConfigurations);
Set<Dependency> dependencies = Sets.newLinkedHashSet();
for (IdeProjectDependency ideProjectDependency : extractedDependencies) {
dependencies.add(moduleDependencyBuilder.create(ideProjectDependency, scope.name()));
}
return dependencies;
}
use of org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency in project gradle by gradle.
the class EclipseDependenciesCreator method createProjectDependencies.
private List<AbstractClasspathEntry> createProjectDependencies() {
ArrayList<AbstractClasspathEntry> projects = Lists.newArrayList();
Collection<IdeProjectDependency> projectDependencies = dependenciesExtractor.extractProjectDependencies(classpath.getProject(), classpath.getPlusConfigurations(), classpath.getMinusConfigurations());
for (IdeProjectDependency projectDependency : projectDependencies) {
projects.add(projectDependencyBuilder.build(projectDependency));
}
return projects;
}
use of org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency in project gradle by gradle.
the class DefaultIdeDependencyResolver method getIdeProjectDependencies.
/**
* Gets IDE project dependencies.
*
* @param configuration Configuration
* @param project Project
* @return IDE project dependencies
*/
public List<IdeProjectDependency> getIdeProjectDependencies(Configuration configuration, Project project) {
ResolutionResult result = getIncomingResolutionResult(configuration);
final Set<ResolvedComponentResult> projectComponents = CollectionUtils.filter(result.getAllComponents(), new Spec<ResolvedComponentResult>() {
@Override
public boolean isSatisfiedBy(ResolvedComponentResult element) {
return element.getId() instanceof ProjectComponentIdentifier;
}
});
List<IdeProjectDependency> ideProjectDependencies = new ArrayList<IdeProjectDependency>();
ProjectComponentIdentifier thisProjectId = DefaultProjectComponentIdentifier.newProjectId(project);
for (ResolvedComponentResult projectComponent : projectComponents) {
ProjectComponentIdentifier projectId = (ProjectComponentIdentifier) projectComponent.getId();
if (thisProjectId.equals(projectId)) {
continue;
}
if (!projectId.getBuild().isCurrentBuild()) {
// Don't have access to the ProjectInstance: we can't use it to determine the name.
ideProjectDependencies.add(new IdeProjectDependency(projectId));
} else {
Project resolvedProject = project.project(projectId.getProjectPath());
ideProjectDependencies.add(new IdeProjectDependency(projectId, resolvedProject.getName()));
}
}
return ideProjectDependencies;
}
use of org.gradle.plugins.ide.internal.resolver.model.IdeProjectDependency 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