Why pluginUntilBuild is mandatory
已回答
Does that mean that I should change pluginUntilBuild(currently it is 211) each time when a new version of IDEA released?
请先登录再写评论。
There is no hard rule whether to specify untilBuild or leave it "open". It basically depends on your chosen strategy of targeting a range of platform versions, e.g. by using dedicated branches and limiting until-build for each platform accordingly.
Otherwise, using Plugin Verifier allows checking for problems (also locally) https://plugins.jetbrains.com/docs/intellij/api-changes-list.html#verifying-compatibility and can be run against any later released version(s).
The probability of problems or incompatibilities largely depends on the specific API a plugin is using, so there's no general advice on which strategy to use.
If I don't specify untilBuild I can't install it too Intellije IDEA, it says untilBuild is not specified. I created plugin using template in GitHub
Please show final plugin.xml and note your exact IDE version you try to install into
It is almost empty
There is no since-build which mandatory. Please see https://plugins.jetbrains.com/docs/intellij/gradle-guide.html#patching-the-plugin-configuration-file on how to set values.
It works, thank you, I've put the version into plugin.xml, and removed code with method patchPluginXml from file build.gradle.kts
if I remove only untilBuild(properties("pluginUntilBuild")) line, without mentions sinceBuild in plugin.xml, then I install the plugin, IDEA says untilBuild not mentioned and denies installing the plugin. Is that possible to mention only sinceBuild version in gradle.properties file. What should I do in order to mention just pluginSinceBuild in properties?
build.gradle.kts file
plugin.xml
If comment untilBuild(properties("pluginUntilBuild")) when intall the plugin IDEA shows
The plugin is not compatible with the current version of the IDE, because it requires build 202.* or older but the current build is IU-211.6693.111
What to do in order to mention version only in build.gradle.kts
Sorry, I'm a bit lost of what you have now and want to achieve. You are setting this value "202.*" in your Gradle build script explicitly, so obviously it cannot be installed into earlier versions like 211.6693.111.
I suggest to remove both since/until-build attributes from your plugin.xml _completely_ and set them as you wish from build.gradle patchPluginXml task. All the variants are fully described in docs mentioned above (https://plugins.jetbrains.com/docs/intellij/gradle-guide.html#patching-the-plugin-configuration-file).
The patching DSL generates both, the required `since-build` and the optional `until-build` attribute in plugin.xml regardless, even when the latter is not specified in the `patchPluginXml` in build.gradle. IMHO this is a source of confusion (confused me at least).
The solution is to not use patching DSL at all (`intellij.updateSinceUntilBuild = false`) and leave only `idea-version` tag in plugin.xml.
When I set `until-build` to `null`, I see that it is produced in the XML. However, it is not produced when I set `until-build` to an empty string.
The `intellij-platform-gradle-plugin` repo has lots of github workflow bits that depend on these properties being set. This is getting painfully time consuming to fix/workaround.
Please see the linked page above https://plugins.jetbrains.com/docs/intellij/configuring-plugin-project.html#patching-the-plugin-configuration-file, it documents this topic in great detail.