gradle: handle cycles during configuration project dependencies collect IDEA-158517

This commit is contained in:
Vladislav.Soroka
2016-08-05 14:37:59 +03:00
parent a89c03fd00
commit 396b621fda
@@ -143,8 +143,10 @@ class DependencyResolverImpl implements DependencyResolver {
Map<ComponentIdentifier, ComponentArtifactsResult> componentResultsMap = [:];
componentResults.each { componentResultsMap.put(it.id, it) }
Set<Configuration> processedConfigurations = new HashSet<>()
def projectDeps
projectDeps = { Configuration conf, map = ArrayListMultimap.create() ->
if(!processedConfigurations.add(conf)) return map
conf.incoming.dependencies.findAll { it instanceof ProjectDependency }.each { it ->
map.put(toComponentIdentifier(it.group, it.name, it.version), it as ProjectDependency)
projectDeps((it as ProjectDependency).projectConfiguration, map)