ComponentMetadataDetailsAdapterTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add reason to `DependencyMetadata`

This allows propagating reasons from `Dependency` to `DependencyMetadata`, which in turn can be used

as `ComponentSelectionReason` descriptions. Doing this lets us display the description in the dependency

insight report.

This commit, however, does **not** add support for serializing reasons, or publishing them. This means

that this only works for direct dependencies so far.

Signed-off-by: Cedric Champeau <cedric@gradle.com>

    • -1
    • +1
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 26 more files in changeset.
Rename 'experimental features' to 'feature previews'

The idea behind this is that we have a set of feature previews rather

than one cryptic experimental flag.

A feature preview collects a set of related functionality (e.g.

everything related to gradle metadata) that changes existing behavior

and thus could potentially break existing builds. The preview options

will be removed with the next major release (currently 5.0) and the new

behaviour will then become the default.

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

    • -1
    • +1
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 45 more files in changeset.
Add support for `allVariants` in component metadata rules

This commit introduces the ability to execute component metadata rules on all variants at once. This

leverages the previous refactoring by pushing down the variant metadata spec to the adapter itself,

making it possible to match on any possible condition.

    • -5
    • +61
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 4 more files in changeset.
Rework variant dependency/constraint/attributes rules

This commit changes how the variant rules (dependencies, constraints or attributes) are

handled. Instead of being indexed by variant name, it's now a generic container, which

checks if the specified `VariantMetadata` applies. This will allow us to implement rules

which apply unconditionnaly on every variant, or on variants which have a specific

attribute set.

Signed-off-by: Cedric Champeau <cedric@gradle.com>

    • -28
    • +0
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 23 more files in changeset.
Provide additional services to constructor calls in tests

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

    • -1
    • +1
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 14 more files in changeset.
Initial implementation of component metadata rules allowing modification of variant attributes

This commit introduces metadata rules that support modification of variant attributes. Variant attributes

are specific to each variant and can be found in module metadata. Those are NOT component level attributes,

which could be used during dependency resolution. This will be added in a subsequent commit.

    • -4
    • +11
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 49 more files in changeset.
Create all mutable Ivy module resolve metadata through factory

This will simplify the injection of services through the factory, when we will need the immutable

attributes factory to be pushed to resolve metadata.

    • -2
    • +4
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 26 more files in changeset.
Instantiate mutable Maven metadata through dependency injecting instantiator

This commit prepares the ability to inject services into mutable Maven metadata. This will be

required to inject the immutable attributes factory, as well as the object instantiator and

possibly other services to the immutable Maven resolve metadata. This commit reduces the

number of constructors of `DefaultMavenModuleResolveMetadata`, to make it easier to maintain.

Some tests still create mutable module resolve metadata directly. Ideally, they should also

use the factory.

    • -2
    • +2
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 19 more files in changeset.
Rework `DefaultMutableIvyModuleResolveMetadata` constructors for consistency

Introduce constants where it makes sense and use consistent order of parameters.

    • -1
    • +1
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 5 more files in changeset.
Adjust tests to changes in implementation types

    • -1
    • +1
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 3 more files in changeset.
Adjust implementation of dependency metadata modification for constraints

This introduces shared abstract implementations for handling

dependencies and dependency constraints, where they behave similar.

It injects a second notation parser that produces

DependencyConstraintMetadata instances.

    • -4
    • +5
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 19 more files in changeset.
Remove ability update Excludes on metadata

This functionality wasn't required, and was adding complexity.

    • -1
    • +1
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 6 more files in changeset.
Improve code structure, documentation and test coverage

    • -7
    • +7
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 10 more files in changeset.
Extend metadata rules to allow adjustment of dependencies

This adds:

- withVariant(variant_name) {}:

Choose an existing variant (or

configuration) by name to modify its dependencies.

This hook can later be used to modify attributes of a variant.

- withVariant(variant_name) { withDependencies {} }:

Inside the withDependencies block, existing dependencies can be

removed and new dependencies can be added.

    • -0
    • +122
    ./ComponentMetadataDetailsAdapterTest.groovy
  1. … 34 more files in changeset.