PublishedDependencyConstraintsIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Adjust tests and samples to new metadata sources defaults

    • -6
    • +6
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 95 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -3
    • +3
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 19 more files in changeset.
Fix corner case of deferred selector resolution

When a selector is deferred and the constraint disappears, it still

needs to be resolved.

    • -0
    • +62
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 1 more file in changeset.
Delay selection when constraint exists

When a node makes it into the graph, it potentially can transform

pending constraints into valid edges. When that happens, we defer the

selection of the the node so that it happens when the constraint

selector also is known.

In the best case, a fixed version is computed, skipping a dynamic

version resolution. In the worst case, the defer was not needed because

the constraint does not change the selection result.

    • -1
    • +1
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 11 more files in changeset.
Differentiate between dependency and constraint edges in `ResolveTestFixture`

    • -5
    • +6
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 8 more files in changeset.
Tidy up variant-names in integration tests

Instead of inlining the expected variant name in the module coordinates,

use `ResolveTestFixture.expectDefaultConfiguration(variant)`.

    • -4
    • +4
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 8 more files in changeset.
Enable improved POM support by default

This commit makes the experimental flag `IMPROVED_POM_SUPPORT` the default.

The flag is still there for backwards compatibility but has effectively no

impact. As a consequence, the behavior of improved POM support is now the

default, which implies that:

- Maven dependencies packaged as `pom` or `jar` now have derived variants

(`compile` and `runtime`) and we properly choose between the variants based

on the consumer attributes

- platform dependencies using the `platform` and `enforcedPlatform` keywords

are enabled

Enabling improved POM support by default is a **breaking change**: there's

a risk that resolved dependencies is different, in particular because we

will now only include the `compile` dependencies of a POM file whenever the

consumer asks for the API variant. There are also some changes in the

dependency insight reports due to the use of attribute based matching instead

of configuration selection.

Last but not least, this commit is likely to introduce a small performance

regression due to attribute based selection.

    • -2
    • +3
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 50 more files in changeset.
Import POM files as different variants

This commit implements solution 6 of #4422, by importing POM files

using different variants. By default, a POM file will be imported

as 6 different variants:

- 2 libraries (runtime and compile)

- 4 platforms (runtime and compile, regular and enforced)

This implies that a dependency on a BOM will now be intepreted as

a dependency on a library, whereas a dependency on a BOM expressed

using the `platform(...)` or `enforcedPlatform(...)` methods will

be interpreted as importing the platform component published at

the same coordinates.

This commit doesn't remove optional dependencies for Maven, but

reimplements how the dependencies are shuffled in different variants.

The dependencies found in a dependency management block are no

longer considered optional. Instead, they are properly marked as

constraints. However, they are only visible if using the experimental

flag, **and** using the platform variant.

    • -4
    • +1
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 31 more files in changeset.
Consistently report conflict resolution

This commit refactors how conflict resolution selection reasons are handled, in order to:

- collect the list of versions which participated in conflict resolution

- report a single conflict resolution cause when conflicts are resolved several times for the same module

- consistently report module replacement rules as rules, not conflict resolution. Before this change,

a module replacement was reported as both a conflict and a rule

    • -4
    • +4
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 29 more files in changeset.
Align documentation and tests on feature preview API

    • -1
    • +1
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 16 more files in changeset.
Add more test coverage for dependency constraint reasons

    • -2
    • +8
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 1 more file in changeset.
Adjust tests to use the new experimental feature option

Signed-off-by: Jendrik Johannes <jendrik@gradle.com>

    • -3
    • +1
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 23 more files in changeset.
Let Maven and Ivy module fixture provide java library variants

    • -2
    • +2
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 8 more files in changeset.
Add EXPERIMENTAL_RESOLVE_BEHAVIOR feature to GradleMetadataResolveRunner

This adds the test variant where experimental features are enabled for

resolving dependencies, but module metadata was not published to the

repository that is used. The feature combination

EXPERIMENTAL_RESOLVE_BEHAVIOR=false && GRADLE_METADATA=true

is excluded, as Gradle metadata is completely ignored without

experimental features.

    • -26
    • +17
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 9 more files in changeset.
Activate experimental features in test when testing maven optional

    • -16
    • +26
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 1 more file in changeset.
Rename 'optional' to 'pending' in dependency resolution code (#3637)

    • -1
    • +1
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 18 more files in changeset.
Consume published dependency constraints during dependency resolution

    • -0
    • +401
    ./PublishedDependencyConstraintsIntegrationTest.groovy
  1. … 18 more files in changeset.