return gradleDep;
}
private static GradleDependency loadDependencyConfiguration(GradleDependency dep, InvocationWithClosure invocation)
{
GradleDependencyBuilder builder = GradleDependencyBuilder.create(dep);
// Search for excludes
List<GradleDependency> excludes = Lists.newArrayList();
for (InvocationWithMap mapInvocation : invocation.getInvocationsWithMap())
{
if (mapInvocation.getMethodName().equals("exclude"))
{
String group = mapInvocation.getParameters().get("group");
String module = mapInvocation.getParameters().get("module");
// If group is not set then by default it uses dep group
if (Strings.isNullOrEmpty(group))
{
group = dep.getGroup();
}
excludes.add(GradleDependencyBuilder.create().setGroup(group).setName(module));
}
}
builder.setExcludedDependencies(excludes);
return builder;
}