CapabilitiesLocalComponentIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Annotate tests to account for new reported problems

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 48 more files in changeset.
Annotate tests to account for new reported problems

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 48 more files in changeset.
Annotate tests to account for new reported problems

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 49 more files in changeset.
Annotate tests to account for new reported problems

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 49 more files in changeset.
Annotate tests to account for new reported problems

Signed-off-by: Paul Merlin <paul@gradle.com>

    • -0
    • +2
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 49 more files in changeset.
Add equality contract between Capability impls

Now that we can have either `ImmutableCapability` or

`ProjectDerivedCapability` on a selector, they need to be able to do

cross equality checks.

    • -0
    • +21
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 2 more files in changeset.
Add equality contract between Capability impls

Now that we can have either `ImmutableCapability` or

`ProjectDerivedCapability` on a selector, they need to be able to do

cross equality checks.

    • -0
    • +21
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 2 more files in changeset.
Add equality contract between Capability impls

Now that we can have either `ImmutableCapability` or

`ProjectDerivedCapability` on a selector, they need to be able to do

cross equality checks.

    • -0
    • +21
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 2 more files in changeset.
Add equality contract between Capability impls

Now that we can have either `ImmutableCapability` or

`ProjectDerivedCapability` on a selector, they need to be able to do

cross equality checks.

    • -0
    • +21
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 2 more files in changeset.
Make capabilities conflict error lenient

When a capability conflict cannot be resolved, it is now recorded on the

graph, similarly to a version conflict. It means that the error becomes

lenient, allowing consumption of the result in a lenient fashion.

It also enables analyzing capabilities conflict through

`dependencyInsight` amongst other.

Fixes #8428

    • -2
    • +3
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 16 more files in changeset.
Initial support for optional features

This commit introduces initial support for optional features, by

implementing a way for a dependency declaration (currently *only* in

the DSL) to request variants of the target component that provide one

or more capabilities.

Previously to this change, selection was (simplified) done like this:

1. find the target component

2. select the variant of the target component which matches the requested

attributes

Now, selection introduces another step:

1. find the target component

2. filter variants by eliminating those which do not provide the requested

capabilities

3. select the variant in this list which matches the requested attributes

Several changes had to be implemented:

First, component metadata rules calling `addCapability` will now return

a component which capabilities _include_ the default capability.

Second, attribute filtering is done in a secondary step, which means that

if there are no variant matching the requested capabilities, we will immediately

fail.

    • -0
    • +1
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 58 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'

}

```

    • -4
    • +4
    ./CapabilitiesLocalComponentIntegrationTest.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.

    • -0
    • +57
    ./CapabilitiesLocalComponentIntegrationTest.groovy
  1. … 16 more files in changeset.