Get plugin version in Grails script provided by a plugin

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get plugin version in Grails script provided by a plugin

Benjamin Wolff
Hi,

I have a plugin that provides several Grails commands via scripts in the /scripts/ folder of the plugin. Is it possible to access in version of the plugin in these scripts?

Thank you!

Cheers,
Ben
Cheers,
Ben
Reply | Threaded
Open this post in threaded view
|

Re: Get plugin version in Grails script provided by a plugin

Benjamin Wolff
I found the solution by myself. One can use the implicit 'pluginSettings' script variable like this:

String currentPluginVersion = pluginSettings.getPluginInfoForName("name-of-the-plugin-in-dash-notation")?.version

Cheers,
Ben
Cheers,
Ben