Search only for one artifact when version listing
If a dependency declaration includes multiple target artifacts, we now
only use the first artifact name in order to list versions (when no
metadata files are present). Previously, we'd list versions that exist
with _any_ artifact pattern.
While this is theoretically a breaking change, there are a number of
factors that mean any change to behaviour is unlikely:
- For standard `maven` repositories, the `maven-metadata.xml` file is used
to list versions.
- For standard `ivy` repositories, the `ivy.xml` file pattern is used to
list versions.
- Even without any metadata files, when using a standard repository layout 2
dependency artifacts will result in the same version listing pattern.
The exception is with `flatDir` repositories, which have no revision directory.
There are further mitigating factors:
- Dependency artifacts are unlikely to be widely used, except as a mechanism to support
the setting of `classifier` or `extension` on a dependency. In these cases,
only a single dependency artifact will result.
- In the rare case where 2 dependency artifacts are present, both must exist for resolution
to succeed. So the previous behaviour would have listed versions that could not be resolved.
I feel this is very unlikely to cause any issues in the real world.
Signed-off-by: Daz DeBoer <daz@gradle.com>