Is `MapProperty#insert` no longer available? I see...
# community-support
a
Is
MapProperty#insert
no longer available? I see it was announced in 8.7 but I can't see it in 8.9. https://docs.gradle.org/8.7/release-notes.html#better-api-for-updating-collection-properties The release notes are very confusing and misleading. If it's not available, then what's the alternative?
t
Those methods have been tentatively added twice and then removed in a subsequent version due to various issues (you can probably find the details in the GitHub issues and/or PRs) For now, there's no alternative for adding to a MapProperty while keeping the existing convention, all you can do is use put() which will shadow the convention (if any).
a
thanks! I'm not sure what you mean by 'shadow the convention' though...
the main problem I have is that I have
myMapProp.put("foo", providers.gradleProperty("foo")
- when
foo
is empty, then everything in
myMapProp
is silently completely removed.
I guess I could use a NDOC instead...