Changed the way that the target configuration for a project dependency is calculated, to always select only from the configurations of the target project that have attributes attached, regardless of whether the consumer has defined any attributes or not. Fall back to `default` only when the target project has no configurations with attributes defined.
This introduces a breaking change when consuming the output of a project with the Java plugin applied from a project that does not have the Java plugin applied. Previously, the `default` configuration would be selected, now the `runtimeElements` configuration is selected. However, this is consistent with the case where the consuming project is also using the Java plugin or is using the Android plugin. It also means that custom configurations in these projects will select the same thing as the runtime classpath configuration.
05 Jun 17 983212247682ba92ad03328abce8dc24c04eab51
Treat various kinds of dependency resolution failures in more consistent ways.
- When a non-lenient view is used as a task input, then propagate any failure to select a configuration in the dependency graph during task graph calculation, rather than suppressing these kinds of failures and propagating later when the files happen to be queried. This now happens consistently whether fluid dependencies are used or not. The only difference between these is how much of the graph is traversed at task graph calculation time.
- When a lenient view is used as a task input, suppress configuration selection failures during task graph calculation and instead present them in `ArtifactCollection.failures`. Do this consistently regardless of whether fluid dependencies are used or not. Previously this kind of failure was propagated during task graph calculation for lenient views.
Also changed the error message on resolution failure to include what kind of query was being performed at the time to trigger the failure.
From an implementation point of view, separated the handling of selection failures from the code that produces the legacy resolution result so that this handling can be reused when the legacy result is not required (such as, say, when calculating the task graph).
29 May 17 cd7035ef3c0d461dc94f290bf56bb5ae638e7d20