LifecycleProjectEvaluatorTest.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.

    • -2
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 72 more files in changeset.
Emit build operations around container callback executions (core and dependencyMgmt containers) (#7734)

* Decorate taskcontainer callbacks to track application id

* Decorate plugin container callbacks

* Decorate repositoryContainer callbacks

* Decoreate configurations and configuration.dependencies container callbacks

* Decorate artifactTypesDecorator callbacks

* Dont emit build ops for internal declared callbacks

* Provide usercode context in beforeResolve / afterResolve callbacks

* keep compatibility for nebula.dependency-recommender plugin

* Put domain collection callback build ops behind feature toggle

* Decorate Provider.configure() methods

* Simplify container callback filtering and decoration

Previously, we had three classes collaborating to achieve this but now this is inlined into effectively one. While this creates a more complex implementation, that is still rather simple, it avoids the more problematic complexity of a complicated relationship between the three implementations that also required extra state and details to be propagated through all of the collections.

    • -1
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 70 more files in changeset.
Treat failures in `Project.afterEvaluate` handlers consistently with failures in `buildFinished` and include these failures in the build outcome report rather than suppressing them when project configuration fails.

    • -3
    • +3
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 25 more files in changeset.
Enable project mutation while evaluating before/afterEvaluate blocks

    • -0
    • +4
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 2 more files in changeset.
Restore semantics of ProjectState.executed (#5594)

The Android plugin is relying on this being true when in afterEvaluate

    • -6
    • +13
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 5 more files in changeset.
Add build operations around after/beforeEvaluate and projectsLoaded/Evaluated lifecycle hooks (#5558)

* Wrap build op around projectsLoaded hooks

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Add test coverage

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Wrap build op around projectsEvaluated hooks

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Wrap build ops around project evaluation hooks

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Don't make new ops logging groups

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Add test coverage

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Quieten down logging

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Fix test

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Fix codenarc

Signed-off-by: Tom Dunstan <tom@gradle.com>

* Polish before and after evaluate build operations

* Polish projectsEvaluated and projectsLoaded build operations

* fix unit tests

* Use wrapped exception as operation failure exception

    • -77
    • +128
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 19 more files in changeset.
Honor nested `afterEvaluate` requests

By doing a sort of fixed-point iteration on `notifyAfterEvaluate`

until no more `afterEvaluate` listeners are registered.

See #3411

    • -0
    • +4
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 4 more files in changeset.
Rationalise handling of “current” build operation and build operation ID

For an upcoming change to emit console logging as build operation progress events, we need to associate all progress logging with the build operation. This pulled a thread on some long overdue cleanup.

The end result is:

1. Base build operation infrastructure is consolidated org.gradle.internal.operations.

2. Mechanism for passing thread global current build operation is more test friendly, and better named.

3. A consistent mechanism is used for binding the current operation to the thread, instead of two mechanisms.

4. Build operation IDs are typed to OperationIdentifier.

There is no public API or user behaviour change.

    • -1
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 147 more files in changeset.
Respect --stacktrace for afterEvaluate error that is logged separately

    • -0
    • +2
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 2 more files in changeset.
Reorganise the rich build operation details/results type to further decouple from producer side semantics.

    • -4
    • +4
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 82 more files in changeset.
Different build operations for configure and cross-configure project

Adds operation descriptor details to Configure Project build operation.

    • -4
    • +23
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 14 more files in changeset.
Also state in the short name that the project is configured

Is this is nested in an operation like `allprojects`, using only

the project path is a bit confusing.

    • -1
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 2 more files in changeset.
Revert "Adjust expectations to name change of config project build operation"

This reverts commit 9eabec6bd13b37cfb24d55880a9083e4e877d1b3.

    • -1
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 1 more file in changeset.
Adjust expectations to name change of config project build operation

    • -1
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 1 more file in changeset.
Use a specialized service for project configuration

Separates project configuration code (with build operations) from

`DefaultProject` and other places where project configuration

can be triggered.

    • -1
    • +3
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 9 more files in changeset.
Adjust integration test setup to PluginManager and Gradle changes

    • -0
    • +4
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 4 more files in changeset.
Some tweaks to display names in tapi build progress events from nested builds.

    • -2
    • +8
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 14 more files in changeset.
Ensure that task and project configuration failures are attached to TAPI progress events.

Reworked `BuildOperationExecutor` to allow the action for an operation to mark the operation as failed without throwing an exception.

    • -7
    • +2
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 19 more files in changeset.
Added `Project.getDisplayName()`.

    • -6
    • +6
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 4 more files in changeset.
Treat configuration of a project as a build operation, to make it visible to instrumentation. This means, for example, that configuration of each project will be visible to TAPI clients using `ProgressListener`.

    • -2
    • +9
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 3 more files in changeset.
Revert "Project configuration as a build operation"

This reverts commit 45584fe6ca616ed8a3d454cca0a64ab70a25ac30.

+review REVIEW-6336

    • -2
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 4 more files in changeset.
Project configuration as a build operation

+review REVIEW-6336

    • -1
    • +2
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 4 more files in changeset.
Move model registry validation (as it is) to the point where we realize the task container.

This follows the precedent of CoD in that configuration problems in projects that aren't required won't surface.

This is also not the final state of meta model validation, but restores some parity after recent selective task closing changes.

+review REVIEW-5335

    • -42
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 24 more files in changeset.
Introduce project finalizer action to LifecycleProjectEvaluator

+review REVIEW-5176

    • -6
    • +43
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 2 more files in changeset.
Configuration performed to “bridged” model element made in afterEvaluate() is visible to creation rule

+review REVIEW-5176

    • -1
    • +12
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 16 more files in changeset.
Revert "Configuration performed to “bridged” model element made in afterEvaluate() is visible to creation rule"

This reverts commit e8f4af3c5c53ee660100ac6158ae232396f0621b.

    • -12
    • +1
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 11 more files in changeset.
Configuration performed to “bridged” model element made in afterEvaluate() is visible to creation rule

+review REVIEW-5176

    • -1
    • +12
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 11 more files in changeset.
Don't redundantly lock the project class loader scope after evaluating.

    • -5
    • +2
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 1 more file in changeset.
Add missing test dependency.

    • -0
    • +3
    ./LifecycleProjectEvaluatorTest.groovy
Moved some classes from org.gradle.configuration to org.gradle.configuration.project.

    • -0
    • +152
    ./LifecycleProjectEvaluatorTest.groovy
  1. … 42 more files in changeset.