Hi,
I am wondering if there is a standard way for two step plugin initialization. The first step would setup the extension with defaults. The user would then configure the extension as needed, and finally the plugin would complete it’s setup.
Basically I am looking for something like this:
// Suppose myplugin registers the 'mypluginconfig' extension but has other steps
// that need to be run asap before other parts of the build script but require some
// plugin configuration first
apply 'myplugin'
mypluginconfig {
// do some configuration
}
// TODO Complete myplugin initialization here
// Now continue on with the script
I suppose I could add an interface with a “completeSetup” method or something but that requires the user to remember to call it:
// Complete myplugin initialization here
project.plugins.getPlugin('myplugin').completeSetup();
I am wondering if these is a standard/better way to do this? Thanks!