gradle: do not fail if there is an unresolved dependency a configuration has

This commit is contained in:
Vladislav.Soroka
2015-11-24 13:56:03 +03:00
parent 8d4d476cf6
commit b2b3e0b9e0
@@ -128,15 +128,16 @@ class DependencyResolverImpl implements DependencyResolver {
componentResults.each { componentResultsMap.put(it.id, it) }
ResolutionResult resolutionResult = configuration.incoming.resolutionResult
def fileDeps = new LinkedHashSet<File>(configuration.incoming.files.files);
artifactMap
artifactMap.values().each {
fileDeps.remove(it.file)
}
fileDeps.each {
def fileCollectionDependency = new DefaultFileCollectionDependency([it])
fileCollectionDependency.scope = scope
result.add(fileCollectionDependency)
if(!configuration.resolvedConfiguration.hasError()) {
def fileDeps = new LinkedHashSet<File>(configuration.incoming.files.files);
artifactMap.values().each {
fileDeps.remove(it.file)
}
fileDeps.each {
def fileCollectionDependency = new DefaultFileCollectionDependency([it])
fileCollectionDependency.scope = scope
result.add(fileCollectionDependency)
}
}
result.addAll(transform(Lists.newArrayList(), resolutionResult.root.dependencies, artifactMap, componentResultsMap, scope))
}