Dynamically generated Plugin XML Description
Answered
Hi!
Is it possible to insert 'dynamically generated content' into the plugin XML description element? In particular, we would like to get the currently installed plugin version and interpolate this into the description. I'm hoping to get something like
PluginManagerCore.getPlugin(...).getVersion()
to insert into the text.
Any advice would be greatly appreciated.
Many Thanks
Scott Smith
Please sign in to leave a comment.
You can achieve it using the gradle-intellij-plugin very easily. It allows you to patch the plugin.xml file during the build process:
intellij {
version ideaVersion
patchPluginXml {
pluginDescription(file("description.html").text.replace("%VERSION%", ideaVersion))
}
}
For more, check the Gradle IntelliJ Plugin documentation about the Patching DSL.
Thanks Jakub!