You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was a change we did in order to make all Provider behave the same initially. Starting with 5.0, no provider has an initial value set. The ListProperty and SetProperty used to be set as an empty collection. Now you can use the builder-like method empty() or value(...) to provide a value upon creation. We are unlikely to change this behavior back to what it was previously. As a workaround when targetting older Gradle version, you can set the property to an empty list (i.e. set([])) after creation. Given that, there still a behavior that causes friction detailed here: #7485. You are welcome to comment on that one.
For your docker plugin, users can work around when upgrading to the latest Gradle version by doing instructions.empty() at the top of the configuration action. They have to be careful to avoid calling any instruction creating method as a set, empty or value remove any element added prior to the value change (this is the friction we are sorting out).
I will close this issue as we won't be changing the behavior anymore.
Expected Behavior
An initialized
ListProperty
does not fail the build indicating that it has not been initialized.Current Behavior
An initialized
ListProperty
for a POJO annotated with@Nested
fails the build indicating that no value has been assigned which is not the case.The error message you receive:
Context
Using a
ListProperty<POJO>
annotated with@Nested
used to work properly with 4.10.2. It behaves differently in 5.0-rc-1.Steps to Reproduce (for bugs)
Run
./gradlew build
for the repository https://github.com/bmuschko/docker-incremental-nested-list.Your Environment
The text was updated successfully, but these errors were encountered: