How can I ensure my plugin is compatible with both Kotlin versions k1 and k2 across different IntelliJ IDEA releases from 2022.3 to 2024.3?

I was checking the compatibility results for my plugin and encountered a warning about compatibility with k2, as shown in the following image:

It indicates that I need to declare a compatibility mode, but… my plugin’s support range is “223.7571.182 — 243.x”, and I plan to maintain this interval, for example, “224.7571.182 — 244.x”, “230.7571.182 — 250.x”.

This presents a problem. My plugin’s development version is 223.7571.182, which didn’t have this extension, so I can’t declare compatibility or migrate the dependency on BindingContext to analyze.

I can’t continue using only k1 without supporting k2 until the release of 2026.2 (at which point I will drop support for 2024.1), nor can I abandon support for k1 and only support IDEA versions starting from 2024.2. What should I do?

You’ll need to build and release separate versions of your plugin for each range of supported IDEs if you need to support any features only present in newer version.

So you’re suggesting that I should release an entirely new plugin to provide support for k1 from 2022.3 to 2024.2, and adjust the support range of the current plugin to start from 2024.2 onwards?

Technically not a “new” plugin, but a dedicated release.
e.g. you can use release numbers like 1.0-223 for plugin supporting 2022.3+ and another release 1.0-242 for plugin built against 2024.2+.

Hmm, I’ve noticed the link in your previous reply now… I initially thought that wasn’t part of your response, as I’ve never seen a hyperlink that looks like that before…
I’m looking into that link now, thanks for your suggestion!