xref: /aosp_15_r20/external/ktfmt/ktfmt_idea_plugin/DEVELOPING.md (revision 5be3f65c8cf0e6db0a7e312df5006e8e93cdf9ec)
1## Meaning of Versions
2
3Versions are defined in `build.gradle.kts`.
4
5`intellij.version` is used for -
61. Building the plugin, so the source code needs to be compatible with it.
72. Determining the _maximum_ supported version. This means that it needs to be updated every time a new IntelliJ _Branch_ version is released. For example, 2021.1, 2021.2, etc.
8
9`tasks.patchPluginXml.sinceBuild` is used for -
101. Determinig the _minimum_ supported version, so the code must not reference classes not introduced yet.
11
12
13## Testing
14
15* Use Gradle to run the plugin.
16* _Don't_ use IntelliJ to run the plugin.
17
18```
19ktfmt/ktfmt_idea_plugin $ ./gradlew runIde
20```
21
22Point `intellij.alternativeIdePath` in `build.gradle.kts` to a local installation of IntelliJ / Android Studio to test the plugin with it. Don't forget to enable the plugin. Easiest way: Cmd-shift-A, type 'ktfmt', look for Preferences.
23
24Another way: change `intellij.version` and comment out `alternativeIdePath`. This will run the plugin on whatever version you put - it'll be downloaded through Gradle.
25