The JetBrains Academy plugin supports several versions of the IntelliJ platform. When the new IntelliJ version comes out, we need to prepare plugin's build with the new version and handle all the incompatible changes in API. To reduce the number of supported IntelliJ versions, we also drop versions support from time to time. The following guide describes how to support new IntelliJ versions and drop old ones.
The following instruction uses old, current and new terms:
old
- the oldest supported platform version that should be droppedcurrent
- number (or numbers, depends on context) of the latest major stable platform release(s) that are supported by the pluginnew
- new platform version that should be supported
For example, at the moment of writing, 193
is old
, 201
and 202
are current
, and 203
is new
.
See build_number_ranges for more info about platform versions.
-
Drop all code related to the
old
platform version, i.e. dropgradle-%old%.properties
and all%module_name%/branches/%old%
directories in each module -
Move common code from all current platform-specific
%module_name%/branches/%current%
directories into common source set, i.e. from%module_name%/branches/%current%
into%module_name%
. Also, simplify the moved code if possible.Compare With
action may help you to determine identical files in platform-specific directories. -
Add support for
new
platform. Common steps how to do it:- add
gradle-%new%.properties
with all necessary properties - copy all
%module_name%/branches/%current%
directories for latest supported platform as%module_name%/branches/%new%
- make it compile
The last step may require extracting some code into platform-specific source sets to make plugin compile with each supported platform. See Tips and tricks section for the most common examples of how to do it
- add
-
Fix tests. If you don't know how to fix some tests (especially if you are not a maintainer of the corresponding subsystem), just create an issue in YouTrack
-
Update TeamCity configuration to provide new subproject instead of the old one. At the moment of writing, it requires changing
EducationalSupportedReleases
inintellij-teamcity-config
repo -
Fix
BACKCOMPAT: %old%
comments. You can find all such comments viaFind in Path
action. Also, you can add\bbackcompat\b.*
pattern intoPreferences | Editor | TODO
setting panel to show such comments inTODO
tool window