DefaultLocalComponentMetadataBuilderTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Add deprecation mechanism for configurations

    • -3
    • +3
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 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
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 164 more files in changeset.
Avoid accessing `ResolutionStrategy` for non-root components

To determine if a configuration should have dependency locking enabled,

we inspect the ResolutionStrategy for that configuration. However, we

were needlessly inspecting this for configurations in referenced

projects, leading to added contention.

With this change, we only inspect the resolution strategy for

configurations when building the component metadata for the root

component, not for any referenced project components.

    • -2
    • +2
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 12 more files in changeset.
Add configurations to metadata serially

This will permit the added configuration to be later modified by the

caller, so that we can apply specific logic to configurations of the

root component.

    • -1
    • +2
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 4 more files in changeset.
Use ResolutionStrategy as entry point to active locking

Issue #3182

    • -2
    • +2
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 13 more files in changeset.
Replace `CapabilitiesExtension` with outgoing variants DSL

This commit replaces the need for a `CapabilitiesExtension` by adding the declaration

of variant capabilities on outgoing configuration variants. Instead of:

```

capabilities {

api 'org.test:foo:1.0'

}

```

one should now write:

```

configurations.api.outgoing {

capability 'org.test:foo:1.0'

}

```

    • -1
    • +1
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 24 more files in changeset.
Introduce `CapabilitiesExtension`

This commit adds a capabilities extension which can be applied to a project. If it's added, local

components gain the ability to declare capabilities. Currently, only the `java-library` plugin

supports capabilities, but it's expected that more plugins will add it (for example, the native

plugin), which explains why the extension lives in `core`.

When a project declares capabilities, they are bound to configurations. This lets us fail whenever

a local component capability conflicts with a transitive module capability. It will also let us

publish capabilities for local components in a subsequent commit.

    • -3
    • +4
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 16 more files in changeset.
Rename metadata builders

- `ConfigurationComponentMetaDataBuilder` -> `LocalComponentMetadataBuilder`

- `DependenciesToModuleDescriptorConverter` -> `LocalConfigurationMetadataBuilder`

    • -0
    • +67
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 21 more files in changeset.
Run Configuration dependency actions only when required

This change fixes #3908, by deferring the execution of Configuration

`withDependencies` and `defaultDependencies` actions. Previously,

these were executed when constructing the LocalComponentMetadata

instance for resolving: this execution is now deferred until the

dependencies or excludes for the LocalConfigurationMetadata are

actually required.

Fixes #3908

Signed-off-by: Daz DeBoer <daz@gradle.com>

    • -0
    • +2
    ./DefaultLocalComponentMetadataBuilderTest.groovy
  1. … 6 more files in changeset.