Home > Net >  How do intellij.version and sinceBuild (untilBuild) relate to each other?
How do intellij.version and sinceBuild (untilBuild) relate to each other?

Time:08-02

I have version in intellij block in build.gradle.kts:

intellij {
    version.set("2021.2.1")
    type.set("IC")
    plugins.set(listOf("android"))
}

and patchPluginXml:

patchPluginXml {
    sinceBuild.set("212")
    untilBuild.set("223.*")
}

here sinceBuild is set accordingly to intellij.version. but is this correct? which relations should have this properties? can I set sinceBuild lower than intellij.version?

CodePudding user response:

The version in the intellij block is the version (number) of IntelliJ gradle will use to build the plugin. As a result, this is also the IntelliJ version used for the sandbox IDE when you run gradle runIde.

The sinceBuild and untilBuild are the version numbers that specify the range of IntelliJ versions the plugin (build with version) supports. You basically give users a guarantee that your plugin works with any IntelliJ version within this range. When you upload a plugin to the market place, your plugin will be verified against all these versions by the IntelliJ Plugin Verifier. You can also do this yourself with the runPluginVerifier task.

So, yes, you can set sinceBuild lower than version and probably should. More often than not you want to test and build for the newest release while still supporting a few older versions.

With your current settings (version is 2021.2.1, sinceBuild is 212, and untilBuild is 223.*), your plugin will be built with 2021.2.1 and you promise users that your plugin will work with any IntelliJ version from 2021.2.1 until 2022.3.*. When anyone tries to install your plugin with an IntelliJ older or newer than the specified range they will get a message saying that your plugin is not compatible with their IntelliJ version.

  • Related