Use dependency attributes when selecting variants of a single component
This commit makes sure that attributes defined on a dependency are used whenever
a component has multiple variants, and we need to select one of the variants.
However, this doesn't work yet when an attribute on a dependency overrides the
consumer attributes (the attributes defined on a configuration). In this case,
we will rightfully select the variant, but as soon as we try to get the artifacts
of this variant, we will fail, because we're selecting _again_ the variant, but
the only thing we have at this point is the selected component and the consumer
attributes (we have lost the dependency attributes).
06 Apr 18 cc20fa66d0ed52be5ae8229bfa2d1239a24abcdc
Separate Dependency Constraint and Dependency declarations (#4255)
The interfaces for declaring these two different things were
coupled in the initial implementation - to reuse all functionality
based on the Dependency interface directly. This interface is used
internally to pass dependency declarations through the resolution
process. However, this is only due to remembering the first
level dependencies for the "old" results API
These implementation specifics should not bleed into the API.
A dependency declaration defines a *requirement*:
I require module/project X
A dependency constraint defines a *constraint*:
If I must use X, I can only work with versions matching the constraint
Only if we look at external dependencies, constraints and external dependencies
share the ability to declare a *version constraint*. Therefore, both now
Now, dependency constraints are removed as "first level dependencies"
from the result. This is fine as the dependency itself is still in the
result graph - when there is a constraint, there is always at least one other
12 Feb 18 0ec234fd7862b42e78a25017e3f950838344723f