I am creating an internal distribution for Gradle, and to make things more testable/faster I am trying to move as much as possible to bundled plugins.
I found that while the documentation states that Gradle is the delegate for init scripts, it doesn’t seem to expose the initscript script handler in the same way as Project exposes buildscript.
Also, it seems that Gradle does not allow for registering of extensions, which forces me to use the actual plugin class as an API for the user-configurable parts of the init script.
Answering my own question, the initscript and buildscript are quite special in the way they are handled, and in my case, I’m rethinking the approach as to not need access to initscript from a plugin (becomes chicken and egg problem).