I’m looking for a public API to create an instance of org.gradle.api.DomainObjectCollection
. I am aware that I can create an instance of org.gradle.api.NamedDomainObjectContainer
via Project.container()
but my objects are not named. So far I only found that it’s very easy to instantiate org.gradle.api.internal.DefaultDomainObjectSet
as it has a constructor taking just the type but it’s clearly an internal API given the package it lives under.
The reason I ask is because I would like to use its “live collection” behaviour to support lazy configuration in my custom plugin.