ComponentSelectionRulesErrorHandlingIntegTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Use ivy derivation rules in resolve tests

This allows us to get rid of some special casing in tests that

do not specifically test ivy-only behavior. This tests that common

variant aware dependency management scenarios work for ivy if used

in the recommended way.

    • -6
    • +9
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 12 more files in changeset.
Use ivy derivation rules in resolve tests

This allows us to get rid of some special casing in tests that

do not specifically test ivy-only behavior. This tests that common

variant aware dependency management scenarios work for ivy if used

in the recommended way.

    • -6
    • +9
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 12 more files in changeset.
Allow variant matching opt-in for ivy through component metadata rules

    • -6
    • +9
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 15 more files in changeset.
Allow variant matching opt-in for ivy through component metadata rules

    • -6
    • +9
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 18 more files in changeset.
Allow variant matching opt-in for ivy through component metadata rules

    • -6
    • +9
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 20 more files in changeset.
Allow variant matching opt-in for ivy through component metadata rules

    • -6
    • +9
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 20 more files in changeset.
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -6
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 32 more files in changeset.
Align implementations of artifact identifier display names

DefaultModuleComponentArtifactIdentifier now behaves similar as

ComponentFileArtifactIdentifier (showing the full actual file name).

This means that the artifact name used during reporting now

contains the version at the usual position in the file name.

This way it shows the actual file name for artifacts originating

from pom-only maven repositories (except snapshots, which show the

SNAPSHOT placeholder) and ivy repositories with default pattern.

The motivation for this alignment is to get the same representation for

the same file, independent of whether it was sourced from traditional

or Gradle module metadata.

    • -6
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 32 more files in changeset.
Adjust tests and samples to new metadata sources defaults

    • -18
    • +8
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 95 more files in changeset.
Remove 'experimental' variant from dependency resolution tests

With the 'GRADLE_METADATA' feature preview gone, we now only have

two dimensions of variation to test:

(1) Ivy or Maven repository?

(2) Gradle metadata available - in addition to pom or ivy - or not?

If Gradle 6+ was used for publishing, Gradle metadata is most likely

available and the pom/ivy file contains the corresponding marker.

If an older Gradle version (or Maven/Ivy) was used for publishing,

Gradle metadata is not available and there is also no marker in the

other metadata file.

    • -18
    • +8
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 32 more files in changeset.
Remove 'experimental' variant from dependency resolution tests

With the 'GRADLE_METADATA' feature preview gone, we now only have

two dimensions of variation to test:

(1) Ivy or Maven repository?

(2) Gradle metadata available - in addition to pom or ivy - or not?

If Gradle 6+ was used for publishing, Gradle metadata is most likely

available and the pom/ivy file contains the corresponding marker.

If an older Gradle version (or Maven/Ivy) was used for publishing,

Gradle metadata is not available and there is also no marker in the

other metadata file.

    • -18
    • +8
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 32 more files in changeset.
Remove 'experimental' variant from dependency resolution tests

With the 'GRADLE_METADATA' feature preview gone, we now only have

two dimensions of variation to test:

(1) Ivy or Maven repository?

(2) Gradle metadata available - in addition to pom or ivy - or not?

If Gradle 6+ was used for publishing, Gradle metadata is most likely

available and the pom/ivy file contains the corresponding marker.

If an older Gradle version (or Maven/Ivy) was used for publishing,

Gradle metadata is not available and there is also no marker in the

other metadata file.

    • -18
    • +8
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 32 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 10 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 10 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 8 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 8 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 11 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 11 more files in changeset.
Remove parameter support in ComponentSelectionRules

Previous parameters are available on `ComponentSelection` instead.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 8 more files in changeset.
Introduce a `JAVA_API_JARS` usage

This commit introduces a new `JAVA_API_JARS` usage, mirror

to the `JAVA_RUNTIME_JARS` usage. This is both for consistency,

and to make sure that the `JAVA_API` and `JAVA_RUNTIME` usages

are limited to cases where the consumer doesn't care, or when

a producer doesn't have a more specific usage to provide.

This is, for example, the case for Java platforms. It's worth

noting than in case a producer mixes both "generic" usages

and "specific" usages, selection is likely to produce unexpected

results, because of disambiguation rules.

The Java disambiguation rule has been simplified and now

supports more cases.

    • -6
    • +6
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 37 more files in changeset.
Implement variant derivation strategy

This commit changes how Maven metadata is derived into variants. Now we will

only derive variants if the Java plugin is applied (the "base Java" plugin).

This is implemented via a variant derivation strategy, and allows fixing

the problem that a native component is unlikely to find sense in the derivation

of Java variants. This fixes a bug where the native plugins wouldn't be able

to consume native libraries published on Maven repositories, without Gradle

metadata.

    • -6
    • +6
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 43 more files in changeset.
Deprecate extra parameters in ComponentSelectionRules

Since methods have been added on ComponentSelection, the logic for

detecting extra parameters in provided closures is now deprecated.

Fixes #6607

    • -2
    • +4
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 12 more files in changeset.
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

attributes.

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.

    • -1
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 37 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.

    • -3
    • +3
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 9 more files in changeset.
Do not use artifact metadata source when experimental features are enabled

    • -2
    • +4
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 4 more files in changeset.
Do not request Ivy/POM file when module metadata is used

The previous change meant that the Ivy/POM was not _used_ when

a module metadata file was found. With this change, the unusued

file is not requested when it won't be needed.

The change is trivial, but it required changes to our test

infrastructure due to the change expected requests.

    • -32
    • +22
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 8 more files in changeset.
Revert "Change ModuleDependencyResolveTests to always run with experimental=true"

This reverts commit 50f819b030450635ea8eb3aded3f9d811da9b8cf.

    • -1
    • +3
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 2 more files in changeset.
Change ModuleDependencyResolveTests to always run with experimental=true

It still tests the case where we do not have module metadata in the

repository. But the build that resolves from the repository always

has the new behavior - look for module metadata first - turned on.

    • -3
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 3 more files in changeset.
Converted `ComponentSelectionRulesErrorHandlingIntegTest` to cross-repository test fixtures

    • -61
    • +137
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 1 more file in changeset.
Some changes to apply consistent formatting for how methods are referred to in rule source validation error messages, plus applied consistent capitalization for the error messages.

+review REVIEW-5739

    • -1
    • +1
    ./ComponentSelectionRulesErrorHandlingIntegTest.groovy
  1. … 16 more files in changeset.