Track unmatched versions in SelectorState Previously, when resolving a selector we were registering the unmatched versions at the component level. The `ComponentState` would keep a map of selector -> unmatched versions, which would later be reconnected to the original selector.
With this change, the unmatched versions are kept with the `SelectorState` until required to form a component selection reason. This simplifies the logic and reduces the number of collection copies required.
Implement variant derivation strategy This commit changes how Maven metadata is derived into variants. Now we will only derive variants if the Java plugin is applied (the "base Java" plugin). This is implemented via a variant derivation strategy, and allows fixing the problem that a native component is unlikely to find sense in the derivation of Java variants. This fixes a bug where the native plugins wouldn't be able to consume native libraries published on Maven repositories, without Gradle metadata.