ResolveTestFixture.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Add BY_ANCESTORS selection reason

  1. … 2 more files in changeset.
Add BY_ANCESTORS selection reason

  1. … 2 more files in changeset.
Add BY_ANCESTORS selection reason

  1. … 2 more files in changeset.
Add support for 'forSubgraph' to metadata test fixtures

  1. … 7 more files in changeset.
Add support for 'forSubgraph' to metadata test fixtures

  1. … 7 more files in changeset.
Add support for 'forSubgraph' to metadata test fixtures

  1. … 7 more files in changeset.
Add support for 'forSubgraph' to metadata test fixtures

  1. … 7 more files in changeset.
Add support for 'forSubgraph' to metadata test fixtures

  1. … 7 more files in changeset.
Add support for Java test fixtures

This commit introduces conventional support for _test fixtures_

in the Java ecosystem.

The `java` extension, available when applying either the `java`

or `java-library` plugins, now adds a couple of methods:

- `enableTestFixtures`, which will create an additional source

set for test fixtures

- `usesTestFixturesOf`, which declares that this project makes

use of the test fixtures of another project or external module

This feature builds on top of the existing feature variant

infrastructure, which means that:

- test fixtures are published (as optional dependencies in Maven,

as variants with Gradle metadata)

- test fixtures have a conventional capability

The capability for test fixtures is `test-fixtures`, so it means

that if the project has a name `foo`, then its test fixtures

would be published with a capability name of `foo-test-fixtures`.

Test fixtures expose an API and an implementation, available

through the `testFixturesApi` and `testFixturesImplementation`

configurations.

When test fixtures are enabled, the test fixtures API automatically

gets a dependency onto the main component (aka `src/main/java`).

  1. … 9 more files in changeset.
Add support for Java test fixtures

This commit introduces conventional support for _test fixtures_

in the Java ecosystem.

The `java` extension, available when applying either the `java`

or `java-library` plugins, now adds a couple of methods:

- `enableTestFixtures`, which will create an additional source

set for test fixtures

- `usesTestFixturesOf`, which declares that this project makes

use of the test fixtures of another project or external module

This feature builds on top of the existing feature variant

infrastructure, which means that:

- test fixtures are published (as optional dependencies in Maven,

as variants with Gradle metadata)

- test fixtures have a conventional capability

The capability for test fixtures is `test-fixtures`, so it means

that if the project has a name `foo`, then its test fixtures

would be published with a capability name of `foo-test-fixtures`.

Test fixtures expose an API and an implementation, available

through the `testFixturesApi` and `testFixturesImplementation`

configurations.

When test fixtures are enabled, the test fixtures API automatically

gets a dependency onto the main component (aka `src/main/java`).

  1. … 9 more files in changeset.
Add support for Java test fixtures

This commit introduces conventional support for _test fixtures_

in the Java ecosystem.

The `java` extension, available when applying either the `java`

or `java-library` plugins, now adds a couple of methods:

- `enableTestFixtures`, which will create an additional source

set for test fixtures

- `usesTestFixturesOf`, which declares that this project makes

use of the test fixtures of another project or external module

This feature builds on top of the existing feature variant

infrastructure, which means that:

- test fixtures are published (as optional dependencies in Maven,

as variants with Gradle metadata)

- test fixtures have a conventional capability

The capability for test fixtures is `test-fixtures`, so it means

that if the project has a name `foo`, then its test fixtures

would be published with a capability name of `foo-test-fixtures`.

Test fixtures expose an API and an implementation, available

through the `testFixturesApi` and `testFixturesImplementation`

configurations.

When test fixtures are enabled, the test fixtures API automatically

gets a dependency onto the main component (aka `src/main/java`).

  1. … 9 more files in changeset.
Add support for Java test fixtures

This commit introduces conventional support for _test fixtures_

in the Java ecosystem.

The `java` extension, available when applying either the `java`

or `java-library` plugins, now adds a couple of methods:

- `enableTestFixtures`, which will create an additional source

set for test fixtures

- `usesTestFixturesOf`, which declares that this project makes

use of the test fixtures of another project or external module

This feature builds on top of the existing feature variant

infrastructure, which means that:

- test fixtures are published (as optional dependencies in Maven,

as variants with Gradle metadata)

- test fixtures have a conventional capability

The capability for test fixtures is `test-fixtures`, so it means

that if the project has a name `foo`, then its test fixtures

would be published with a capability name of `foo-test-fixtures`.

Test fixtures expose an API and an implementation, available

through the `testFixturesApi` and `testFixturesImplementation`

configurations.

When test fixtures are enabled, the test fixtures API automatically

gets a dependency onto the main component (aka `src/main/java`).

  1. … 9 more files in changeset.
Change ResolveTestFixture to default to 'runtimeClasspath'

  1. … 1 more file in changeset.
Change ResolveTestFixture to default to 'runtimeClasspath'

  1. … 1 more file in changeset.
Change ResolveTestFixture to default to 'runtimeClasspath'

  1. … 1 more file in changeset.
Adjust test to changes in ResolveTestFixture

  1. … 1 more file in changeset.
Use java-library and its configurations in ResolveTestFixture

This mainly influences the composite build tests which intensively

use this fixture.

  1. … 13 more files in changeset.
Fix Groovy/Java library compatibility

This commit fixes the Groovy + Java Library compatibility,

by making sure that if, and only if, the Java Library is

applied on a project that also applies the Java Library

plugin, then the correct variants is selected.

  1. … 4 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.

  1. … 37 more files in changeset.
Test for selecting multiple variants of a local project

This commit adds a test showing we can use variant-aware dependency management

to select 2 variants of the same project.

This test is not intended to be an example how to expose test fixtures,

it's only there for coverage.

  1. … 4 more files in changeset.
Support depending on multiple variants of the same component

This commit changes the resolution engine so that it is possible

to resolve multiple variants of the same component when using

variant-aware dependency management.

Before, in order to have 2 dependencies on the same component

but using different variants, one had to use explicit configuration

dependencies. Now, with this change, it is possible to have

two dependencies on the same component, but with different attributes.

Those components would resolve to different variants.

Special treatment is applied when attributes are declared on constraints:

in this case, we _merge_ the constraint attributes, and make sure that

the edge is computed using the merged attributes. Should they be

incompatible, the build would fail as before.

  1. … 29 more files in changeset.
Tweak the output produced by `TreeFormatter`.

  1. … 36 more files in changeset.
Use repository content filtering when selecting dynamic versions

This commit fixes an issue with content filtering, which led to versions

being silently ignored because we were listing versions, _then_ filtering.

Instead, this commit makes sure we actually only return versions which

do participate in the repository.

  1. … 6 more files in changeset.
Differentiate between dependency and constraint edges in `ResolveTestFixture`

  1. … 8 more files in changeset.
Simplify verification of constraints in `ResolveTestFixture`

  1. … 3 more files in changeset.
Track unmatched versions in SelectorState

Previously, when resolving a selector we were registering the unmatched

versions at the component level. The `ComponentState` would keep a map

of selector -> unmatched versions, which would later be reconnected to

the original selector.

With this change, the unmatched versions are kept with the `SelectorState`

until required to form a component selection reason. This simplifies the

logic and reduces the number of collection copies required.

  1. … 11 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.

  1. … 43 more files in changeset.
Add support for forcing a platform using a constraint

This commit adds support for aligning a platform to a forced

version using a constraint. Similarly to the dependency case,

this allows forcing the platform, but also implies that the

members of the platform are _also_ forced.

  1. … 6 more files in changeset.
Update Nebula recommender plugin version for smoke test

The ResolveTestFixture needed a fix to handle selection reasons with a

newline character.

The test assertions have changed as 'selected by rule' now requires

additional message.

Fixes #6177

  1. … 2 more files in changeset.
Consistently report conflict resolution

This commit refactors how conflict resolution selection reasons are handled, in order to:

- collect the list of versions which participated in conflict resolution

- report a single conflict resolution cause when conflicts are resolved several times for the same module

- consistently report module replacement rules as rules, not conflict resolution. Before this change,

a module replacement was reported as both a conflict and a rule

  1. … 29 more files in changeset.