Clone Tools
  • last updated a few minutes ago
Constraints: committers
Constraints: files
Constraints: dates
Improve error reporting in case no matching dynamic version is found

This commit improves rendering of errors in case resolution fails because

all versions in a dynamic range are evicted, and that at least one of the

evicted versions was evicted because of attribute matching. The error will

now report the attributes on each tested version, as well as the requested


For this, the module not found exception has been updated to carry more

context, and now makes use of the tree formatter for consistency with other

exceptions in the codebase.

    • -37
    • +124
  1. … 37 more files in changeset.
Convert many uses of ModuleVersionSelector -> ModuleComponentSelector

- Uses of ModuleDependency.getRequested() to ModuleDependency.getSelector()

    • -1
    • +1
  1. … 27 more files in changeset.
Rename `DefaultVersionConstraint` to `DefaultMutableVersionConstraint`

... and use the immutable version whenever possible.

    • -6
    • +6
  1. … 63 more files in changeset.
Make `ModuleComponentSelector` the source of truth for version constraints

This commit pushes `VersionConstraint` as a primary concept in `ModuleComponentSelector`. It replaces the (now)

deprecated `getVersion` call, which didn't reflect all possible constraints on a version. This change has several


- version constraints now need to be "serializable"

- version constraints now consist of a preferred version and a list of rejected versions

- only a single item in the rejection list is supported

- Gradle module metadata parsing now generates a prefer/reject list

- Gradle module metadata writing does **not** yet support writing prefer/reject

- the module metadata binary format has been bumped to support prefer/reject in module descriptors

- metadata rules can say `useTarget(VersionConstraint)`

Issue #3312

    • -5
    • +6
  1. … 93 more files in changeset.
Use component id rather than module version id in the 'required by' paths in resolve exceptions. This provides a better description for local components, and also allows for components that don't have a module version id.

    • -3
    • +4
  1. … 13 more files in changeset.
Added more detail to the 'could not find any matches for selector' error message, to distinguish between:

1. No versions were found.

2. Some candidate versions were found but none matched the selector (and what those versions were).

3. Some matching versions were found by all were rejected by component selection rules (and what those versions were).

Changed ModuleVersionResolveException constructor so that it does not pass the provided message through String.format().

    • -9
    • +70
  1. … 22 more files in changeset.
Moved some exception and result types out of org.gradle.api.internal.artifacts into org.gradle.internal.resolve

    • -0
    • +74
  1. … 109 more files in changeset.