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 dependency.
Add support for publishing resolved versions of dependencies This commit adds support for using the resolved versions of dependencies when publishing with the `maven-publish` plugin. There are currently only 2 formats supported:
1. POM files, in which case the declared version is replaced with the resolved version in the <dependency> block 2. Gradle metadata, in which case we add an additional property to the `json` file, the `resolved` property. This property is NOT used when resolving, yet.