NamedObjectInstantiatorTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Move managed factories to a registry

  1. … 48 more files in changeset.
Move managed factories to a registry

  1. … 48 more files in changeset.
Reuse the in-memory caching strategy for `NamedObjectInstantiator`, rather than using a custom implementation.

  1. … 4 more files in changeset.
Reuse the in-memory caching strategy for `NamedObjectInstantiator`, rather than using a custom implementation.

  1. … 4 more files in changeset.
Reuse the in-memory caching strategy for `NamedObjectInstantiator`, rather than using a custom implementation.

  1. … 4 more files in changeset.
Reuse the in-memory caching strategy for `NamedObjectInstantiator`, rather than using a custom implementation.

  1. … 4 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 25 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 27 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 27 more files in changeset.
Replace most usages of `NamedObjectInstantiator.INSTANCE` with injection of a global service instead. This allows the instantiator to be contextualized, for example to handle caching of the generated types.

  1. … 27 more files in changeset.
Allow `RegularFileProperty` and `DirectoryProperty` types to be used on artifact transform parameter objects, and take care of fingerprinting and building the files before running the transform.

Reuse the mechanism that allows instances of generated classes to describe their state to the isolation infrastructure for other core Gradle types, such as `ConfigurableFileCollection`, `Provider` and `Property` and remove the custom isolation logic for these core types.

  1. … 38 more files in changeset.
Allow `RegularFileProperty` and `DirectoryProperty` types to be used on artifact transform parameter objects, and take care of fingerprinting and building the files before running the transform.

Reuse the mechanism that allows instances of generated classes to describe their state to the isolation infrastructure for other core Gradle types, such as `ConfigurableFileCollection`, `Provider` and `Property` and remove the custom isolation logic for these core types.

  1. … 38 more files in changeset.
Special case the isolation for generated `Named` types, to make this faster for variant selecting.

  1. … 29 more files in changeset.
Special case the isolation for generated `Named` types, to make this faster for variant selecting.

  1. … 29 more files in changeset.
Support isolation of a 'managed' type (a Gradle provided implementation of an interface or abstract class with no fields) without serialization.

The implementation is shared for types generated by `NamedObjectFactory` and `ClassGenerator`.

    • -5
    • +41
    ./NamedObjectInstantiatorTest.groovy
  1. … 23 more files in changeset.
Support isolation of a 'managed' type (a Gradle provided implementation of an interface or abstract class with no fields) without serialization.

The implementation is shared for types generated by `NamedObjectFactory` and `ClassGenerator`.

    • -5
    • +41
    ./NamedObjectInstantiatorTest.groovy
  1. … 23 more files in changeset.
Allow values created using `ObjectFactory.named()` to be used with `@Input` task properties, and in other places where value snapshots are used to provide isolation, such as the parameters to artifact transforms.

This change makes these types known to the value snapshot infrastructure, to allow the infrastructure to be used for variant attribute values, which make heavy use of named values.

  1. … 8 more files in changeset.
Added some unit test coverage.

    • -5
    • +14
    ./NamedObjectInstantiatorTest.groovy
Changed contract for `ObjectFactory.named()` so that it throws `ObjectInstantiationException` on failure, for consistency with `newInstance()`.

  1. … 3 more files in changeset.
Removed `DefaultObjectFactory` singleton.

    • -0
    • +14
    ./NamedObjectInstantiatorTest.groovy
  1. … 4 more files in changeset.
Split the generation and creation of named object instances out of `DefaultObjectFactory`. This separation will allow `DefaultObjectFactory` to later be contextualised with scoped services to be injected into the objects that it creates, as currently it is a global service due to the generation of named object types.

    • -0
    • +251
    ./NamedObjectInstantiatorTest.groovy
  1. … 3 more files in changeset.