Commit 3c815f40 authored by Andy Wilkinson's avatar Andy Wilkinson

Provide group in ResolvedArtifactLibrary to enable discrimination

The fix for gh-1475 introduced the use of an artifact's group to
discriminate between two libraries with the same name (artifact id)
and version. However, in the case of Gradle, a group name was not
provided for libraries that have been resolved from a repository.

This commit updates ResolvedArtifactLibrary to use the group obtained
from the underlying ResolvedArtifact as its discriminator.

Fixes gh-1543
parent 6456f2a5
......@@ -209,7 +209,8 @@ class ProjectLibraries implements Libraries {
private final ResolvedArtifact artifact;
public ResolvedArtifactLibrary(ResolvedArtifact artifact, LibraryScope scope) {
super(null, artifact.getFile(), scope);
super(artifact.getModuleVersion().getId().getGroup(), artifact.getFile(),
scope);
this.artifact = artifact;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment