Dynamically generated Plugin XML Description

已回答

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

0

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.

0

请先登录再写评论。