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 (Configuration.resolvedConfiguration()).
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 extend ModuleVersionSelector.
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 edge.