This message was deleted.
# plugin-development
s
This message was deleted.
c
This likely needs to be tested on specific Gradle versions you wish to support, as there have been issues with Map/List/SetProperty re: providers, and recent improvements to null handling in providers.
k
Oof.
v
Were there really improvements? If you think about https://github.com/gradle/gradle/issues/13364, that was just closed as duplicate of https://github.com/gradle/gradle/issues/20266 which is still open. So most probably still the whole
MapProperty
will be unset if one of the elements is unset.
k
I don't see how the
MapProperty
issue cited would be a dupe of the
HasMultipleValues
other than "they are semantically similar". I just fear that fixing one might not fix the other. But it's clear that using
put()
to conditionally add a mapping via absent provider might be counterproductive even if the docs say that it can be done.
When it comes to
MapProperty
, my fear is that I end up with some jank that boils down to
Copy code
val property: MapProperty<String, String>
property.put("foo", property.getting("foo").map { ... }.orElse(...))
It haunts me at night.