Fix circular dependencies when project have the same name
Before this commit, during dependency resolution, a synthetic
module version identifier was generated by project, using the
group and name of the project. However, it's possible for a
project in gradle to have the same name as another in the
same build, leading to duplicates. In this case the projects
were mixed together and lead to a circular dependency.
This commit fixes the problem by making sure we generate
distinct module version identifiers for such projects, by
using the full project path as the name instead of the short
This also makes it possible to publish valid publications
when using the maven or ivy publish plugins. However, we detect
this problem early and warn the user that they should overwrite
the project identity in this case.
Support requested capabilities on external dependencies
This commit adds support for having requested capabilities
part of the module component selector, for external dependencies.
This means that if a component is using Gradle metadata, we can
read requested capabilities and honor them during selection.
This reworks where requested capabilities are stored, and in
particular moves them to the `ComponentSelector`, making them
properly part of the identity of a dependency. As such, two
dependencies requiring two different variants by using distinct
capabilities will now properly appear as two different dependencies
in the dependency graph, instead of two variants of the same
16 Jan 19 b5e1d2fe1e5e449f8b49453fb323c2a7ff4de000