private Map<ModuleDependency, String> createDependencyToScopeMap(Conf2ScopeMappingContainer conf2ScopeMappingContainer,
Map<ModuleDependency, Set<Configuration>> dependencyToConfigurations) {
Map<ModuleDependency, String> dependencyToScope = new HashMap<ModuleDependency, String>();
for (ModuleDependency dependency : dependencyToConfigurations.keySet()) {
Conf2ScopeMapping conf2ScopeDependencyMapping = conf2ScopeMappingContainer.getMapping(dependencyToConfigurations.get(dependency));
if (!useScope(conf2ScopeMappingContainer, conf2ScopeDependencyMapping)) {
continue;
}
dependencyToScope.put(findDependency(dependency, conf2ScopeDependencyMapping.getConfiguration()),
conf2ScopeDependencyMapping.getScope());
}
return dependencyToScope;
}