DefaultObjectFactoryTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fixes for previous commit.

  1. … 11 more files in changeset.
When a property has no value, include the chain of properties from which the value is derived in the error message.

This is intended to help with diagnostics, as the user can see where the value should have come from. In this change, the diagnostics only works when `Property<T>` instances are connected together directly, stopping at the first `Provider<T>` which is not such a type.

  1. … 35 more files in changeset.
When a property has no value, include the chain of properties from which the value is derived in the error message.

This is intended to help with diagnostics, as the user can see where the value should have come from. In this change, the diagnostics only works when `Property<T>` instances are connected together directly, stopping at the first `Provider<T>` which is not such a type.

  1. … 35 more files in changeset.
When a property has no value, include the chain of properties from which the value is derived in the error message.

This is intended to help with diagnostics, as the user can see where the value should have come from. In this change, the diagnostics only works when `Property<T>` instances are connected together directly, stopping at the first `Provider<T>` which is not such a type.

  1. … 35 more files in changeset.
When a property has no value, include the chain of properties from which the value is derived in the error message.

This is intended to help with diagnostics, as the user can see where the value should have come from. In this change, the diagnostics only works when `Property<T>` instances are connected together directly, stopping at the first `Provider<T>` which is not such a type.

  1. … 35 more files in changeset.
Fixes for previous commit.

  1. … 5 more files in changeset.
Fixes for previous commit.

  1. … 5 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. … 25 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. … 25 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. … 25 more files in changeset.
Add factory methods to create NamedDomainObjectContainer and DomainObjectSet on ObjectFactory

  1. … 12 more files in changeset.
Add factory methods to create NamedDomainObjectContainer and DomainObjectSet on ObjectFactory

  1. … 12 more files in changeset.
Add a factory method to `ObjectFactory` that can be used to create `ConfigurableFileCollection` instances.

This new method is intended to replace the factory methods on `ProjectLayout`, as `ObjectFactory` is available in all scopes whereas a `ProjectLayout` is only available in project scopes. This also simplifies some task and project extension implementations as now only a single service is required to create the properties.

  1. … 15 more files in changeset.
Add a factory method to `ObjectFactory` that can be used to create `ConfigurableFileCollection` instances.

This new method is intended to replace the factory methods on `ProjectLayout`, as `ObjectFactory` is available in all scopes whereas a `ProjectLayout` is only available in project scopes. This also simplifies some task and project extension implementations as now only a single service is required to create the properties.

  1. … 15 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.

    • -10
    • +14
    ./DefaultObjectFactoryTest.groovy
  1. … 30 more files in changeset.
Fix construction of list, set and map properties created using Kotlin types that map to Java primitive types.

  1. … 5 more files in changeset.
Remove the `ObjectFactory` factory method overloads that take an initial value, and add a `Property.value()` method that can be used to set the initial value instead by chaining the calls to the factory method and the `value()` method.

  1. … 16 more files in changeset.
Change `ObjectFactory` so that it creates list and set properties with no initial value, rather than with an empty collection as the initial value.

Added an `empty()` method as a convenience to use when constructing these kinds of properties.

  1. … 30 more files in changeset.
Add an overload for `ObjectFactory.property()` that takes an initial value for the property.

  1. … 6 more files in changeset.
Change `ObjectFactory.property()` so that the instances it creates have no initial value regardless of the value type.

Also deprecate using this method to create properties with types for which a more specialized factory method is available.

    • -43
    • +19
    ./DefaultObjectFactoryTest.groovy
  1. … 6 more files in changeset.
Add methods to `ObjectFactory` to create `DirectoryProperty` and `RegularFileProperty` instances. These will replace the factory methods on `DefaultTask` and `ProjectLayout` to make construction of these types more consistent with other property types.

  1. … 12 more files in changeset.
Fix creation of `Property` instances from Kotlin when Kotlin basic types such as `kotlin.Boolean` are used as the property type.

Add a bunch of test coverage for inter-operability between plugins that use properties and that are implemented in Java/Groovy/Kotlin and consumers implemented in Groovy DSL/Kotlin DSL/Java/Kotlin.

  1. … 9 more files in changeset.
Replace internal `SourceDirectorySetFactory` with a method on public `ObjectFactory` service, to allow plugins to create instances of this type without resorting to using internal types.

  1. … 44 more files in changeset.
Move factory method that creates `Property` instances from `DefaultProviderFactory` to `DefaultObjectFactory`.

Change `DefaultSourceDirectorySet` to use `ObjectFactory` to create property instances, rather than reaching in to some internal service.

  1. … 8 more files in changeset.
Added a `SetProperty<T>` type as a convenience for dealing with properties of `Set<T>`.

  1. … 18 more files in changeset.
Added `ObjectFactory.property(Class)` as a replacement for `ProviderFactory.property(Class)`. Changed all usages to use the new method.

  1. … 40 more files in changeset.
Extracted public `Property` interface out of `PropertyState` as a first step in renaming. Changed other public APIs, except for the factory methods, to use `Property` instead of `PropertyState`.

Also moved factory method to create a `ListProperty<T>` from `ProviderFactory` to `ObjectFactory`.

    • -0
    • +33
    ./DefaultObjectFactoryTest.groovy
  1. … 32 more files in changeset.