How can we declare a plugin compatible with future versions?
已回答
We have a plugin which only declares
intellij { version.set("2024.1")}
no untilBuild etc.
As I understand https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html this means the plugin should be compatible with future versions of IntelliJ: ""Not specifying until-build means it will include all future builds. This includes future, yet unreleased versions and possibly new IDEs".
However, what we observe is that the plugin becomes incompatible every time a new IDE version is released, and we'll need to release a new version of the plugin to support it (with no other changes than updating "version.set" as above). How can we avoid this?
请先登录再写评论。
The attribute version sets both since and until build values:
Source: https://plugins.jetbrains.com/docs/intellij/configuring-plugin-project.html#patching-the-plugin-configuration-file
Thanks for your response.
So, to conclude, “Not specifying until-build means it will include all future builds.” only holds if intellij.version - which is mandatory - is not specified?
Is there some other way to ensure a plugin stays compatible?
Have you tried explicitly specifying sinceBuild and setting untilBuild to null?
This here worked in an older version of my plugin:
https://github.com/Bradan/intellij-purebasic/blob/01e744adc674a820bcdfe66abf3e05a55a53e0cc/build.gradle#L54
However I switched to gradle.build.kts and didn't try it there, yet. If it doesn't work you can always patch the plugin xml yourself. If you want to automate it, you can add a custom gradle task for that purpose.
For anyone wondering how to do it you can do this:
patchPluginXml {// all your other settingsuntilBuild.set(provider { null })}Source: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#patchPluginXml-untilBuild