What is the correct/idiomatic way for a plugin to expose a method such that it can be called in the build script that applies the plugin. So far I could only think of either method on an extension object or a closure on extra properties (ext namespace) and both of which are apparently discouraged
Extensions are meant as a way of extending the build script DSL.
The ‘ext’ space is for adhoc storage. Plugins should never use this
All I want to be able to do in build.gradle is to call
my.namespace.method(with, some, params). And, if at all there is no other way, which one of the two above is lesser evil