Deprecated API usage and new IntelliJ versions
Hello,
First of all, I am grateful for any help and your valuable time!
We upload our plugin to plugins.jetbrains.com and received verification results from Jetbrains:
Build of the IDE: IU-201.6668.121
Verdict: Compatible. 11 usages of deprecated API
As I understand to fix this deprecated API we need to switch to the new IDE version?
Currently, we use 2019.1 to build the plugin, but then I tried to switch to 2019.3 I got a few errors because some methods do not exist in this version. As I understand I need to create separate versions for each IDE version. For example, to support correctly 2019.3 and for 2020.1 I need two different versions of our plugin. Is this the right approach? Or someone can suggest how to handle this situation?
Best regards,
Aleksandr.
Please sign in to leave a comment.
You can test your 2019.1 built plugin against 2020.1 in the build.gradle file using:
intellij {updateSinceUntilBuild false
plugins = ['java']
version = '2019.1'
}
runIde {ideDirectory = 'local machine path to 2020.1 IDE directory'
}
The path for that directory can be found in .gradle caches folder in the Users folder on Windows. You would have had to load gradle changes in build.gradle with 2020.1 in version entry to get it.
If it works fine then I'd ignore the warnings, otherwise if it starts bugging out then make a new branch in VCS for 2020.1, modify the files that use deprecated APIs and then build with 2020.1, and
In plugin.xml.
Hello Brian,
Thank you for the response and this information. I'm interested in the second option. The case when I need to support a few IntelliJ versions. For example, 2019.1 and 2020.1. Some APIs were changed in the new version. I understand that its better to create separate branches. But how to configure this case for IntelliJ deployment? So that the result will be like here - https://plugins.jetbrains.com/plugin/7460-cucumber-for-scala/versions.
Thank you!
Alex.
Yes, you would create a branches in VCS/Git for 2019.2, 2019.3 and 2020.1. You can create a git repository for 2020.1 and then create the other specified branches off of it.
That way they can have their own build.gradle files, plugin.xml and modified source files.
In the 2019.2 branch, plugin.xml would have:
build.gradle would have:
intellij {updateSinceUntilBuild false
plugins = ['java']
version = '2019.2'
}
and so on.
Hello Brian,
Thank you for this information and your help!
Regards,
Alex.