ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Make paths/names of included builds immutable (#10998)

Changes the “build path” for included builds to be determined at inclusion time based on the directory name, or a user supplied override. Previously, we tried to use the root project name defined in the included build. This caused a lot of complexity due to it not being known until part way through building the included build.

This change also disallows use of `buildSrc` as a project name, as it collides with the `buildSrc` nested build.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 72 more files in changeset.
Fix tests

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 1 more file in changeset.
Revert "Introduce 'annotationProcessorClasspath' configuration"

This reverts commit 444a899c9cf4c968ce6a490d8148f35a1d631795 and

follow up changes to the annotation processing configurations.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 11 more files in changeset.
Do not use deprecated configurations in tests

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 6 more files in changeset.
Add requested attributes to build operation

This allows a consumer such as build scans to understand which

attributes a resolved configuration was requested with, to allow

distinguishing them when the attributes are different.

    • -0
    • +44
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 3 more files in changeset.
Let dependency-management tests not use deprecated configurations

    • -29
    • +29
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 27 more files in changeset.
Let dependency-management tests not use deprecated configurations

    • -29
    • +29
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 27 more files in changeset.
Let dependency-management tests not use deprecated configurations

    • -29
    • +29
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 27 more files in changeset.
Let dependency-management tests not use deprecated configurations

    • -29
    • +29
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 27 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 19 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 19 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 19 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 19 more files in changeset.
Sort module selectors

This commit reworks module selectors so that they are sorted

in an order which reduces the cost of module selection. We

make sure to put local (project) selectors first, then we

use selectors from locks (if any).

The next selectors are "latest" version selectors because

even if they are dynamic, they are likely to "win" selection.

Then, exact version selectors are sorted by version descending

, and last we add dynamic version selectors.

    • -1
    • +1
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 19 more files in changeset.
Update failOnVersionConflict error message

The message now leverages the description found on the selection reason.

It will enable to report on all conflicts, like capabilites, and not

just version ones.

Issue #8428

    • -3
    • +2
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 6 more files in changeset.
Enable locking for buildscript classpath

This is the shortest solution that works but still requires polishing.

* Make sure the configuration name cannot clash with a similar name in

the project

Issue #5845

    • -0
    • +2
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 4 more files in changeset.
Polish test

    • -6
    • +2
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
Simplify generation of operation trace for resolution result

    • -14
    • +14
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 1 more file in changeset.
Improve test coverage for repository name on resolved components

- Split coverage for successful resolution from failed resolution

- Correctly verify build operation from fully-cached resolution

- Demonstrate bug in Gradle where repository is mis-attributed when

mixing same repository with and without credentials

    • -66
    • +114
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
Add support for emitting information about repositories used during configuration resolution process, and sourced repository for a component (#5959)

- `ResolveConfigurationDependenciesBuildOperationType.Details` now contains a `List<Repository>` eventually provided by all `ResolutionAwareRepository` implementations

- `ResolvedComponentResult` has been subclassed to `ResolvedComponentResultInternal`, to provide the `repositoryName` used as source. This can be `null` in case of project dependency.

- Note that even when artifacts are resolved from the cache, they still convey the original repository that was used as source. The `name` of a repository is guaranteed to be unique inside a given repository container, and we use a single repository container to resolve a given configuration. Hence, the name can be safely used to uniquely identify which repository was used to source components.

- This commit also moves custom serialization logic to the owning type of `SerializedOperation` implementations to their owning types

    • -2
    • +142
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 52 more files in changeset.
Add test coverage for resolution failures in build operations

This adds test coverage, just documenting the current behavior. It

highlights that we might want to be smarter in future versions of

Gradle, however the behavior is consistent accross releases for now.

    • -0
    • +75
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
Set resolution result even in case of failure

Whenever resolution validation fails (in which case the `failed` method is

called), we still want to be able to show the dependency resolution result,

which is a valid graph (in particular in build scans). This commit fixes

this by calling both `failed` (to indicate that the result of resolution is

a failure) and `setResult` (to indicate that despite the failure, there is

a valid, safe, dependency graph to show).

    • -0
    • +2
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 1 more file in changeset.
Fix resolution failure not propagated to build operation

This commit fixes the resolution result errors not being set on the

build operation type, which was a regression from 4.8. The reason is

that failures are thrown lazily, when the resolution result is used,

rather than eagerly. However, we *do* know if consuming the result

would fail, we just have to capture that information before.

    • -0
    • +53
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 3 more files in changeset.
Implement a workaround to make build operation traces fully functional for composite builds. (#4227)

Relates to #3873.

    • -15
    • +15
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 11 more files in changeset.
Simplify and polish.

    • -1
    • +2
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 2 more files in changeset.
Introduce BuildOperationNotificationsFixture to verify exposed Details/Result

    • -31
    • +8
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 2 more files in changeset.
Add annotationProcessor configurations for each SourceSet

And configure the compileJava.options.annotationProcessorPath

to use the configuration when not empty (and use 'null' when

the configuration is empty to preserve the current behavior).

Part of #2300

Signed-off-by: Thomas Broyer <t.broyer@ltgt.net>

    • -0
    • +4
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 21 more files in changeset.
Keep ResolutionResultsStore open for scope of the BuildTree

    • -0
    • +77
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 2 more files in changeset.
Fix test name.

+review REVIEW-6571

    • -0
    • +288
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 1 more file in changeset.
Fix test name.

+review REVIEW-6571

    • -0
    • +288
    ./ResolveConfigurationDependenciesBuildOperationIntegrationTest.groovy
  1. … 1 more file in changeset.