Plugin for few IDE versions

Answered

I use Gradle for building plugins. If I set 

intellij {
version '2018.2'
}

in build.gradle file, the plugin is available for this version only. Else is uncompetitive with this version.

<idea-version since-build="181.0"/>

In plugin.xml doesn't allow use one installation for few versions.

How I can use one plugin for few IDE versions?

(http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html)

0
3 comments

> in build.gradle file, the plugin is available for this version only. Else is uncompetitive with this version.

This is a recommended way to go. You cannot guarantee that your plugin is compatible with 2018.1 if you're using 2018.2 for compiling.

> How I can use one plugin for few IDE versions?

You can build the plugin against several versions, just parametrize `intellij.version` with some system property.

The ways to patch plugin.xml are described in the README: https://github.com/JetBrains/gradle-intellij-plugin/. But again, setting custom since-until builds may lead to the exceptions in the runtime and killing the entire IDE.

0
Avatar
Permanently deleted user

Thank you for the answer.

I mean another feature. 

I have a project like http://www.jetbrains.org/intellij/sdk/docs/tutorials/build_system/prerequisites.html. Then I build it by running task build/build in Gradle panel. I get pluginName.zip file in build/distributions catalog. Then I go to Settings/Plugins in IntellijIdea and click Install from disk and select created zip. I can do it just in IDEA version I set in build.gradle file before building

0

> I can do it just in IDEA version I set in build.gradle file before building

Yes, that's the point. You build different plugin distribution for different IDE major versions. You can upload all them up to plugins repository.

1

Please sign in to leave a comment.