DefaultMavenModuleResolveMetadataTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Replace another usage of the `NamedObjectInstantiator` singleton with an injected service.

    • -5
    • +4
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 30 more files in changeset.
Replace another usage of the `NamedObjectInstantiator` singleton with an injected service.

    • -5
    • +4
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 32 more files in changeset.
Replace another usage of the `NamedObjectInstantiator` singleton with an injected service.

    • -5
    • +4
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 32 more files in changeset.
Replace another usage of the `NamedObjectInstantiator` singleton with an injected service.

    • -5
    • +4
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 32 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

    • -2
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 25 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

    • -2
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 27 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

    • -2
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 27 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

    • -2
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 27 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 21 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 21 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 18 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 21 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 27 more files in changeset.
Update Category attribute to be typed

Adapt code to new typed attributes, dealing with coercible String values

when parsed from metadata and typed values when created inside a Gradle

build.

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 27 more files in changeset.
Rename category attribute

Attribute is now `org.gradle.category` and the constant is named

VARIANT_CATEGORY.

The removal of the "component" part of the name was to clarify to what

the category applies.

    • -1
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 26 more files in changeset.
Rename category attribute

Attribute is now `org.gradle.category` and the constant is named

VARIANT_CATEGORY.

The removal of the "component" part of the name was to clarify to what

the category applies.

    • -1
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 26 more files in changeset.
Rename category attribute

Attribute is now `org.gradle.category` and the constant is named

VARIANT_CATEGORY.

The removal of the "component" part of the name was to clarify to what

the category applies.

    • -1
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 26 more files in changeset.
Split off value snapshotting and attributes related methods of TestUtil

    • -2
    • +3
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 64 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.

    • -0
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 43 more files in changeset.
Add `aar` to the list of tested packagings

    • -1
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
Always derive variants for Maven modules

This effectively removes one path in our codebase, legacy configuration

matching isn't used anymore with Maven modules.

    • -27
    • +20
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 1 more file in changeset.
Reduce cost of deriving variants for Maven metadata

Deriving variant cost is dominated by computing the derived attributes. However,

we know that for Maven metadata, the input attributes are always the same, and

what we use to derive too. So this commit introduces a specialized attributes

factory which goal is to cache concatenation of attributes used in derived

variants.

    • -1
    • +3
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 5 more files in changeset.
Lazily compute derived dependencies

Whenever we compute derived variants, we need to create new `ConfigurationMetadata`. Before, we used to compute

the dependencies of those derived metadata immediately, even if in practice there were a lot of chances that

they would only be needed on the selected variant. The only thing that we need to compute eagerly is the transformed

attributes. However, because attributes can be mutated by component metadata rules, we cannot create a lazy

wrapper on top of `ComponentMetadata`, so this commit bakes in the performance improvement directly to the

default configuration metadata class, which is now lazily computing a derived view of the dependencies based

on a enum corresponding to the different possible cases.

    • -1
    • +1
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 1 more file in changeset.
Remove unused improve pom support flags

    • -11
    • +7
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 19 more files in changeset.
Omit excludes for Maven optional dependencies

For BOM import support, when a <dependencyManagement> entry has a declared <exclusion>,

we apply this exclusion globally whenever the target module is resolved, regardless of

the path to the module. However, this behaviour is not desired for <optional> dependencies,

and these could not be distinguished from <dependencyManagement> entries after the POM was parsed.

With this change, we retain a 'type' attribute for all dependencies parsed from a Maven POM

file. This allows us to omit any exclusions that are defined for a dependency declared with

<optional>, while retaining them for <dependencyManagement> entries.

    • -1
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 8 more files in changeset.
Implement enforced platforms via variants instead of component metadata rules

This commit replaces the component metadat rules implementation with

proper variant based matching. It introduces a new attribute, the component

category, which can currently be either a library or a platform. By default,

components are assumed to be libraries.

    • -1
    • +15
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 14 more files in changeset.
Use `getVersion()` in preference to `getVersionConstraint().getPreferredVersion()`

    • -2
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 13 more files in changeset.
Refactor ModuleResolveMetadata

Reorganize code in packages, move serialization related code closer to

classes to reduce need of public methods.

    • -0
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 79 more files in changeset.
Refactor ModuleResolveMetadata

Reorganize code in packages, move serialization related code closer to

classes to reduce need of public methods.

    • -0
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 79 more files in changeset.
Normalize `ModuleIdentifier`

This commit reworks the `ComponentModuleIdentifier`/`ComponentModuleSelector`/`ModuleVersionSelector`

classes to use `ModuleIdentifier` under the hood, instead of storing denormalized strings. This has

the advantage that we can reduce the use of the module identifier factory, which is called very

often during dependency resolution. Sharing instances reduces the need for conversions, and makes

comparisons faster.

    • -1
    • +2
    ./DefaultMavenModuleResolveMetadataTest.groovy
  1. … 164 more files in changeset.