Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Allow users to create instances of class using injected factories

This gives a way to instantiate objects from the public API,

delegating to the Instantiator.

Issue: #728

  1. … 3 more files in changeset.
Disallow instance fields on abstract classes passed to `ObjectFactory.named()`.

    • -0
    • +33
  1. … 5 more files in changeset.
Added some unit test coverage.

Allow `ObjectFactory.named()` to be used for abstract classes as well as interfaces.

    • -0
    • +31
  1. … 3 more files in changeset.
Generate a factory for `Named` type implementations.

  1. … 1 more file in changeset.
Create `Named` object implementations using classes generated by ASM rather than JVM proxies.

Extracted some shared infrastructure out of the various places that we generate implementations.

  1. … 6 more files in changeset.
Added a public service `ObjectFactory` that can be used to create objects of various kinds for use in the Gradle model. For now, the only kind of object that can be created is immutable instances of `Named` and it sub-types. These are intended to be used for variant attribute values.

This service is available for injection into plugins and tasks (and anywhere else service injection is available). There is also a `Project.getObjects()` method for access.

Other kinds of construction methods can be added to this service later.

Also added a `Project.getProviders()` method for access to a `ProviderFactory`, so we don't have to smear all of its methods onto `Project`.

    • -0
    • +94
  1. … 8 more files in changeset.