Uploading a plugin for multiple IntelliJ major versions


I can build my plugin [1] for different major versions of IntelliJ back to 2018.1. As a result, I can create a separate plugin zip file for each major version from that supported version (currently 5 versions).

My question is if it is possible to upload each of these to https://plugins.jetbrains.com/ such that the new version of the plugin is available to each supported IntelliJ version (e.g. the 2019.1 build available for IntelliJ 191, and the 2019.2 build available for IntelliJ 192).

I've previously tried uploading to different channels, but only the "Stable" channel is used, so new plugin versions uploaded to "Previous" etc. are not recognized by the older IntelliJ versions.

[1] https://plugins.jetbrains.com/plugin/8612-xquery-intellij-plugin

Comment actions Permalink

Yes, you can, I do this with my plugin. The plugin version is <my-version>-<platform-version>, like 1.8.1-2019.1. You can see how the versions work here: https://plugins.jetbrains.com/plugin/8090-cursive/versions. I have a separate git branch for each platform version, and the plugin.xml in each branch specifies the right version range, e.g. <idea-version since-build="192.0" until-build="192.*"/>.

Comment actions Permalink

To upload multiple versions of your plugin, you need to mark them -- in the plugin.xml -- for the compatible IDEA version.  The number is based upon the internal build/branch number, not the public version (e.g. 181, _not_ 2018.1).  The line looks like this:

<idea-version since-build="181.1" until-build="181.*"/>

or, for another version:

<idea-version since-build="192" until-build="192.*"/>

If you upload multiple versions of your plugin to the JetBrains repository, the latest one posted that matches the user's version of IDEA will be presented to the user and downloaded automatically by IDEA.  The release notes displayed on the JetBrains web site will be from the last plugin version uploaded -- so choose your upload order accordingly.

The IntelliJ-Haxe plugin generates plugin.xml files for specific versions based upon a "template" plugin.xml,  You can find the project sources here: http://github.com/HaxeFoundation/intellij-haxe/

Finally, if you use gradle to build your plugin, it will fill in the "since-build" and "until-build" fields for you based upon the version of IDEA you are building with.  Thus, unless you are building the plugin using the earliest release of IDEA that you wish to support, earlier releases won't be available (e.g. the IntelliJ gradle task sets "since-build" to "2018.3.6", _not_ "2018.3.1" as you would want.  To stop that happening, add

intellij {
updateSinceUntilBuild false

to your intellij task as you see here: https://github.com/HaxeFoundation/intellij-haxe/blob/6091e2cba39be6836fef2bb92478ba6a1ba760a2/build.gradle#L82

Comment actions Permalink

Thanks Colin, that looks like it will work. The YYR numbers (e.g. 191) look like they work as well (they are used in the intellij-rust project). I'll try it out for the next release.

Eric, I'm doing exactly that in gradle with the gradle intellij plugin to specify the since and until build numbers for the IntelliJ version I am targetting. The thing I have been missing is adding the IntelliJ version (either the YYYY.R or YYR form) to the end of the plugin version to allow multiple uploads of the same plugin version to the release channel.

Specifying an earlier since build (e.g.

    <idea-version since-build="181" until-build="192.*"/>

) will not work as the IntelliJ platform APIs are different between those versions, and as such I am using slightly different code on each of the major YYR versions.


Please sign in to leave a comment.