diff --git a/topics/basics/getting_started/plugin_compatibility.md b/topics/basics/getting_started/plugin_compatibility.md index e0bb11611..1b3a7cdbc 100644 --- a/topics/basics/getting_started/plugin_compatibility.md +++ b/topics/basics/getting_started/plugin_compatibility.md @@ -104,32 +104,128 @@ This refactoring separated the Java implementation from the other, non-language Consequently, [dependencies](plugin_dependencies.md) on Java functionality are expressed differently in plugin.xml depending on the version of the IntelliJ Platform being targeted: * Syntax for 2019.2 and later releases: - * plugin.xml _allowable alternative_ add `com.intellij.java` - * build.gradle _required_ define dependency on Java plugin `intellij { plugins = ['com.intellij.java'] }` + * plugin.xml (_allowable alternative_): + ```xml + com.intellij.java + ``` + * Gradle build script (_required_): + + + + + ```kotlin + intellij { + plugins.set(listOf("com.intellij.java")) + } + ``` + + + + + ```groovy + intellij { + plugins = ['com.intellij.java'] + } + ``` + + + + * Syntax _required_ for releases prior to 2019.2, _allowable_ in all releases: - * plugin.xml add `com.intellij.modules.java` + * plugin.xml: + ```xml + com.intellij.modules.java + ``` **(3)** The [AppCode and CLion code was restructured](https://blog.jetbrains.com/clion/2020/12/migration-guide-for-plugins-2020-3/) in version 2020.3. This refactoring extracted some functionalities into specific modules for easier maintainability and reuse between AppCode/CLion and other JetBrains IDEs. Consequently, [dependencies](plugin_dependencies.md) on AppCode and CLion functionalities are expressed differently in plugin.xml depending on the version of the AppCode/CLion Platform being targeted: + + + + * Syntax for 2020.3 and later releases: - * plugin.xml _allowable alternative_ add: - * `com.intellij.appcode` for AppCode - * `com.intellij.clion` for CLion - * build.gradle _required_ define dependency on plugin: - * `intellij { plugins = ['com.intellij.appcode'] }` for AppCode - * `intellij { plugins = ['com.intellij.clion'] }` for CLion + * plugin.xml (_allowable alternative_): + ```xml + com.intellij.appcode + ``` + + * Gradle build script (_required_): + + + + + ```kotlin + intellij { + plugins.set(listOf("com.intellij.appcode")) + } + ``` + + + + + ```groovy + intellij { + plugins = ['com.intellij.appcode'] + } + ``` + + + + * Syntax _required_ for releases prior to 2020.3, _allowable_ in all releases: - * plugin.xml add: - * `com.intellij.modules.appcode` for AppCode - * `com.intellij.modules.clion` for CLion + * plugin.xml: + ```xml + com.intellij.modules.appcode + ``` + + + + +* Syntax for 2020.3 and later releases: + * plugin.xml (_allowable alternative_): + ```xml + com.intellij.clion + ``` + + * Gradle build script (_required_): + + + + + ```kotlin + intellij { + plugins.set(listOf("com.intellij.clion")) + } + ``` + + + + + ```groovy + intellij { + plugins = ['com.intellij.clion'] + } + ``` + + + + +* Syntax _required_ for releases prior to 2020.3, _allowable_ in all releases: + * plugin.xml: + ```xml + com.intellij.modules.clion + ``` + + + ## Exploring Module and Plugin APIs Once the [dependency on a module or plugin](plugin_dependencies.md) is declared in plugin.xml, it's useful to explore the packages and classes available in that dependency. The section below gives some recommended procedures for discovering what's available in a module or plugin on which a project depends. -These procedures assume a project has the build.gradle and plugin.xml dependencies configured correctly. +These procedures assume a project has the Gradle build script and plugin.xml dependencies configured correctly. ### Exploring APIs as a Consumer @@ -139,8 +235,8 @@ If the project is not up-to-date, [reimport the Gradle project](https://www.jetb Reimporting the project will automatically update the dependencies. In the Project Window, select Project View and scroll to the bottom to see [External Libraries](https://www.jetbrains.com/help/idea/project-tool-window.html#content_pane). -Look for the library `Gradle:unzipped.com.jetbrains.plugins:foo:`, where "foo" matches, or is similar to the contents of the `` tags in plugin.xml or the `intellij.plugins` declaration in build.gradle. -The image below shows the External Libraries for the example plugin project configuration explained in [Configuring build.gradle](dev_alternate_products.md#configuring-buildgradle-using-the-intellij-idea-product-attribute) and [Configuring plugin.xml](dev_alternate_products.md#configuring-pluginxml). +Look for the library `Gradle:unzipped.com.jetbrains.plugins:foo:`, where "foo" matches, or is similar to the contents of the `` tags in plugin.xml or the `intellij.plugins` declaration in the Gradle build script. +The image below shows the External Libraries for the example plugin project configuration explained in [Configuring Gradle build script](dev_alternate_products.md#configuring-buildgradle-using-the-intellij-idea-product-attribute) and [Configuring plugin.xml](dev_alternate_products.md#configuring-pluginxml). ![Example PhpStorm Project Libraries](php_prj_libs.png){width="700"}