TaskDependencyInferenceIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Rename @FailsWithInstantExecution to @ToBeFixedForInstantExecution

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

    • -3
    • +3
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 872 more files in changeset.
Annotate integ tests failing with instant execution in :core

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

    • -2
    • +5
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 99 more files in changeset.
Fail rather than emitting a deprecation warning when the value of a `Property` typed task property is changed after the task starts execution.

Also include the property display name, if attached, in the 'cannot change the value' error messages.

    • -1
    • +1
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 25 more files in changeset.
Support serialization of collection and map properties with an element or value that is calculated from a task output.

Also support serialization of set properties.

    • -0
    • +53
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 11 more files in changeset.
Providers created using `orElse()` honor producer task dependencies.

    • -0
    • +173
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 2 more files in changeset.
Implicitly finalize the value of task properties with type `ConfigurableFileCollection` when task execution commences, as is done for `Property` types.

    • -8
    • +8
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 14 more files in changeset.
Simplify how task input dependencies are discovered by `TaskInput`, so that the dependencies are visited instead of being added as artificial elements of the input file collection.

Also simplify the resolution of task dependencies provided by `TaskDependencyContainer` and `Provider` instances.

    • -4
    • +4
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 9 more files in changeset.
Added `getLocationOnly()` to file system properties, to provide lazy access to just the location of the file system element, rather than both the location and the content of the file system element.

This can be used when mapping the location of a task output to produce an input to some other task, without implying a dependency on the producing task. For example, an IDE project file generation task may need to know where some output will end up (so need to know its location) but does not use the content of the output.

    • -0
    • +40
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 9 more files in changeset.
Fix task dependency inference when a mapped task output file `Property` is used as input to an `@Input` on another task.

Move some test utility methods out of the artifact transform tests into a more general place, and reuse in some of the task dependency inference tests.

    • -99
    • +174
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 28 more files in changeset.
Change `ObjectFactory` to create collection and map properties whose initial value is an empty collection or map, and add a `convention()` method for collection properties. The "convention" for a property is the value to use when none has been explicitly specified for the property. This changes adds this for collection properties for now. It will be added for all lazy types later.

    • -1
    • +1
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 30 more files in changeset.
Ensure that exceptions thrown by various build event actions and listeners are reported on the console and cause the build to fail.

Previously, failures thrown by `BuildListener`, `TaskExecutionGraphListener` and `ProjectEvaluationListener` listeners and also by `Action` instances passed to `taskGraph.whenReady()` would be ignored.

    • -3
    • +20
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 4 more files in changeset.
Add more test coverage for task dependency inference through collection properties.

    • -0
    • +29
    ./TaskDependencyInferenceIntegrationTest.groovy
Fix the collection property implementations so that they track the producer tasks of each of the elements of the collection.

This allows, for example, these types to be used to model buildable collections of files or directories or to represent task inputs.

    • -0
    • +22
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 7 more files in changeset.
Change the provider returned frmo `flatMap()` so that it uses the producer task details from the result of the transformation, and can be used as a task input.

    • -0
    • +62
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 1 more file in changeset.
Rework task dependency inference so that `Provider` implementations use the same `TaskDependencyContainer` interface that most other things use to declare their producer task to the task resolution infrastructure, rather than having special knowledge sprinkled around various places.

Cleaned up a bunch of `Provider` and `Property` implementations so that more logic is reused rather than reimplemented.

    • -12
    • +90
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 30 more files in changeset.
Fix some consistency issues in task dependency inference for various kinds of providers that do not represent a task output.

    • -9
    • +31
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 2 more files in changeset.
Add some test coverage for task dependency inference with providers.

    • -1
    • +134
    ./TaskDependencyInferenceIntegrationTest.groovy
Support propagation of the producer task for provider instances that are created using `Provider.map()`.

Now, when a provider represents a task or task output, whether mapped or not, that task is taken as the producer of the value and the mapping function is not called. Otherwise, the value of the provider is unpacked and resolved, as it previously was.

Rework the protocol by which providers communicate their build dependencies to consumers.

    • -0
    • +252
    ./TaskDependencyInferenceIntegrationTest.groovy
  1. … 34 more files in changeset.