Gradle

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix failure handling in BuildOperationExecutor

The code block here had a very complicated flow with three nested

tries and finally blocks in between. This caused an issue where

the progress logger did not get the information if the operation

was failing. Because it ran in a finally {} block before the catch

block that recorded the failure.

This fixes this issue and also simplifies the code to only use two

try-blocks. The first is there to makes sure to do a proper

cleanup in case an exception is thrown. It does not execute user

coder directly (hence it only has a finally and no catch).

The inner block now only wraps the execution of the build operation

itself (which can contain user code). It catches and records

the failure before it is rethrown.

The corresponding unit test was actually wrong. It is fixed with

this commit.

Address PR feedback

- register listener after recorded events have been passed to listener

- tweak api of BuildOperationRecorder

Merge pull request #2749 from gradle/oehme/performance/stricter

Make performance tests stricter

Fix integration test: Set environment only for script that is executed

Preserve test-kit daemon logs on CI in case of test failure

There is a dedicated directory for test-kit daemon logs.

Added some validation to `PropertyState.set(Provider)` to fail when the given provider produces values that are not assignable to the property type.

Make test assertion more flexible: logging events use wall-clock time

See also 7923a9f

Fixed unit test for change to `Directory` and `RegularFile`.

Update `@since` tags

Mention contributor in release notes

See #2675

    • -1
    • +2
    /subprojects/docs/src/docs/release/notes.md
Remove unnecessary `final` qualifier

Use correct signature for Test::useJunit

Accepted some breaking changes.

Preserve compatibility with `kotlin-dsl`

    • -2
    • +2
    /subprojects/docs/src/docs/dsl/dsl.xml
Fixed class decoration to handle properties with a getter whose return type is a subtype of `PropertyState`.

Fixed task input and output handling for the change to `Directory` and `RegularFile`.

Changed `Directory` and `RegularFile` so that they do not extend `Provider<File>` as these types represent some immutable location, rather than some calculated value.

Also added `FileSystemLocation` as a common supertype for these types to allow a consumer to declare that they accept a directory or a file or any file system element.

Merged some `PropertyState` implementations and moved some `Provider` implementations into a `Providers` class.

Support additional imports in Twirl templates

    • -0
    • +4
    /subprojects/docs/src/docs/release/notes.md
Tweaked error message when setting `PropertyState` to some incompatible value.

Added some validation to `PropertyState.set()` to fail when a value is provided that is not compatible with the property's type.

Retain a reference to `buildFile` in `DefaultProject`

Each `DefaultProject` instance already retains a reference to the `buildFile`

via it's `ScriptHandler`. However, accessing `buildFile` in this way is

relatively expensive: this was exposed by a new build operation that is emitted

containing this information. By retaining a direct reference to the `buildFile`

this overhead is avoided.

Add XCTest framework for macOS (#2722)

  1. … 13 more files in changeset.
Added some convenience to the Groovy DSL to allow properties of type `PropertyState<T>` to be set using either a `T` or a `Provider<? extends T>` if the relevant setter is not already present.

Properly serialize LogGroupHeaderEvents

Polish `CorePluginResolver`

- Compose method

- Add static imports to shorten lines and improve flow

- Call `getNamespace()` only once to avoid garbage

Fix some tests that check output

Reduce flakiness in native parallel tests

Add javadoc to setters as well

Avoid creating an additional `Action` to configure JUnit