how to build a plugin that is compatible to multiple versions of IntelliJ?

In the build.gradle file:

intellij {
version '2017.3.2'
plugins 'git4idea', 'junit'
}

And the built plugin isn't compatible to IntelliJ 2017.2.2. How to make the plugin work with multiple versions of IntelliJ?

 

Thanks.

2
3 comments

Many thanks for the answers.

The patchPluginXml worked:

intellij {
version '2017.3.2'
plugins 'git4idea', 'junit'
}

patchPluginXml {
sinceBuild '172'
untilBuild '181'
}

With this, the built plugin worked with 2017.2.2 as well as 2017.3.2 and 2017.3.4.

Thanks again.

3

You can patch the plugin.xml with Gradle and modify the range of allowed build numbers:

patchPluginXml {
sinceBuild '172.*'
}

This will make it compatible with all of IntelliJ's 2017.2 builds.

Ciao, Victor.

1

I am not sure about specifying multiple versions with Gradle. It is possible in the plugin.xml file

0

Please sign in to leave a comment.