tools_gradle_intellij_plugin.md: move IntelliJ Extension under the Configuration section

This commit is contained in:
Jakub Chrzanowski 2022-08-25 13:25:06 +02:00
parent 795150c7e3
commit 05180d7fd5
No known key found for this signature in database
GPG Key ID: C39095BFD769862E
15 changed files with 91 additions and 86 deletions

View File

@ -118,10 +118,15 @@ pluginManagement {
</tabs>
## IntelliJ Extension
## Configuration
### IntelliJ Extension
{id="configuration-intellij-extension"}
After the Gradle IntelliJ Plugin is applied, the `intellij` extension can be used to configure the plugin and common settings of the provided tasks.
It is mandatory to specify at least the [`intellij.version`](#intellij-extension-version) property.
It is mandatory to specify at least the [`intellij.version`](#configuration-intellij-extension-version) property.
**Example:**
@ -152,7 +157,7 @@ intellij {
</tabs>
### version
#### version
{id="intellij-extension-version"}
All available JetBrains IDEs versions can be found at [IntelliJ Artifacts](intellij_artifacts.md) page.
@ -179,11 +184,11 @@ Acceptable values
{type="tip"}
### type
#### type
{id="intellij-extension-type"}
The type of the IntelliJ-based IDE distribution.
The type may also be specified as a prefix of the value for the [`intellij.version`](#intellij-extension-version) property instead.
The type may also be specified as a prefix of the value for the [`intellij.version`](#configuration-intellij-extension-version) property instead.
{style="narrow"}
Type
@ -207,7 +212,7 @@ Acceptable values
To build against IDEs not supported directly by `type`, please see their corresponding page in _Part VIII — Product Specific_.
### pluginName
#### pluginName
{id="intellij-extension-pluginname"}
The plugin name part used in the generated ZIP distribution: <path>build/distributions/PluginName-1.0.0.zip</path> and name of the plugin directory in the sandbox directory.
@ -220,7 +225,7 @@ Default value
: `${project.name}`
### localPath
#### localPath
{id="intellij-extension-localpath"}
The path to the locally installed IDE distribution that should be used to build the plugin.
@ -244,11 +249,11 @@ Samples
{type="warning"}
### localSourcesPath
#### localSourcesPath
{id="intellij-extension-localsourcespath"}
The path to local archive with IDE sources.
Used for resolving source files of the locally installed IDE distribution when [`intellij.localPath`](#intellij-extension-localpath) is specified.
Used for resolving source files of the locally installed IDE distribution when [`intellij.localPath`](#configuration-intellij-extension-localpath) is specified.
{style="narrow"}
Type
@ -258,10 +263,10 @@ Default value
: `null`
### plugins
#### plugins
{id="intellij-extension-plugins"}
The list of bundled IDE plugins and plugins from [JetBrains Marketplace](https://plugins.jetbrains.com) or configured [`intellij.pluginsRepositories`](#intellij-extension-pluginsrepositories).
The list of bundled IDE plugins and plugins from [JetBrains Marketplace](https://plugins.jetbrains.com) or configured [`intellij.pluginsRepositories`](#configuration-intellij-extension-pluginsrepositories).
Please see [](plugin_dependencies.md) for more details.
@ -290,7 +295,7 @@ Acceptable values
- `project(":plugin-subproject")`
### updateSinceUntilBuild
#### updateSinceUntilBuild
{id="intellij-extension-updatesinceuntilbuild"}
Enables patching <path>[plugin.xml](plugin_configuration_file.md)</path> with the values of [`patchPluginXml.sinceBuild`](#tasks-patchpluginxml-sincebuild) and [`patchPluginXml.untilBuild`](#tasks-patchpluginxml-untilbuild) properties.
@ -303,14 +308,14 @@ Default value
: `true`
### sameSinceUntilBuild
#### sameSinceUntilBuild
{id="intellij-extension-samesinceuntilbuild"}
Enables patching <path>[plugin.xml](plugin_configuration_file.md)</path> with the [`patchPluginXml.untilBuild`](#tasks-patchpluginxml-untilbuild) using value of [`patchPluginXml.sinceBuild`](#tasks-patchpluginxml-sincebuild) with `*` wildcard, like `sinceBuild.*`, e.g., `221.*`.
Notes:
- Useful for building plugins against EAP builds.
- If [`patchPluginXml.untilBuild`](#tasks-patchpluginxml-untilbuild) has a value set, then [`intellij.sameSinceUntilBuild`](#intellij-extension-samesinceuntilbuild) is ignored.
- If [`patchPluginXml.untilBuild`](#tasks-patchpluginxml-untilbuild) has a value set, then [`intellij.sameSinceUntilBuild`](#configuration-intellij-extension-samesinceuntilbuild) is ignored.
{style="narrow"}
Type
@ -320,7 +325,7 @@ Default value
: `false`
### instrumentCode
#### instrumentCode
{id="intellij-extension-instrumentcode"}
Enables the instrumentation of Java classes with [nullability](https://www.jetbrains.com/help/idea/nullable-and-notnull-annotations.html) assertions and compilation of forms created by [IntelliJ GUI Designer](https://www.jetbrains.com/help/idea/gui-designer-basics.html).
@ -333,7 +338,7 @@ Default value
: `true`
### sandboxDir
#### sandboxDir
{id="intellij-extension-sandboxdir"}
The path of [sandbox directory](ide_development_instance.md#the-development-instance-sandbox-directory) that is used for running IDE with developed plugin.
@ -346,7 +351,7 @@ Default value
: `${project.buildDir}/idea-sandbox`
### intellijRepository
#### intellijRepository
{id="intellij-extension-intellijrepository"}
The IntelliJ-based IDE distributions repository URL.
@ -359,7 +364,7 @@ Default value
: `https://cache-redirector.jetbrains.com/www.jetbrains.com/intellij-repository`
### pluginsRepositories
#### pluginsRepositories
{id="intellij-extension-pluginsrepositories"}
Configures repositories for downloading plugin dependencies.
@ -379,7 +384,7 @@ Acceptable values
- `custom(pluginsXmlUrl)` - use [](custom_plugin_repository.md)
### jreRepository
#### jreRepository
{id="intellij-extension-jrerepository"}
URL of repository for downloading [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance).
@ -392,7 +397,7 @@ Default value
: `null`
### ideaDependencyCachePath
#### ideaDependencyCachePath
{id="intellij-extension-ideadependencycachepath"}
Path to the directory where IDE dependency cache is stored.
@ -406,7 +411,7 @@ Default value
: `null`
### downloadSources
#### downloadSources
{id="intellij-extension-downloadsources"}
Enables downloading the IntelliJ Platform sources.
@ -420,7 +425,7 @@ Default value
: `!System.getenv().containsKey("CI")`
### configureDefaultDependencies
#### configureDefaultDependencies
{id="intellij-extension-configuredefaultdependencies"}
Enables configuration of the default IntelliJ Platform dependencies in the current project.
@ -434,7 +439,7 @@ Default value
: `true`
### extraDependencies
#### extraDependencies
{id="intellij-extension-extradependencies"}
Configures extra dependency artifacts from the IntelliJ repository.
@ -591,7 +596,7 @@ Type
: `String`
Default value
: [`intellij.pluginName`](#intellij-extension-pluginname)
: [`intellij.pluginName`](#configuration-intellij-extension-pluginname)
#### sandboxDir
@ -645,7 +650,7 @@ Type
: `String`
Default value
: [`intellij.type`](#intellij-extension-type)
: [`intellij.type`](#configuration-intellij-extension-type)
#### sinceVersion
@ -659,7 +664,7 @@ Type
: `String`
Default value
: [`intellij.version`](#intellij-extension-version)
: [`intellij.version`](#configuration-intellij-extension-version)
#### untilVersion
@ -686,7 +691,7 @@ Type
: `String`
Default value
: [`intellij.version`](#intellij-extension-version)
: [`intellij.version`](#configuration-intellij-extension-version)
#### untilBuild
@ -800,7 +805,7 @@ Type
: `String`
Default value
: [`intellij.version`](#intellij-extension-version) in `Branch.Build.Fix` format
: [`intellij.version`](#configuration-intellij-extension-version) in `Branch.Build.Fix` format
#### untilBuild
@ -813,7 +818,7 @@ Type
: `String`
Default value
: [`intellij.version`](#intellij-extension-version) in `Branch.Build.*` format
: [`intellij.version`](#configuration-intellij-extension-version) in `Branch.Build.*` format
#### version
@ -871,7 +876,7 @@ Type
: `String`
Default value
: [`intellij.pluginName`](#intellij-extension-pluginname)
: [`intellij.pluginName`](#configuration-intellij-extension-pluginname)
#### configDir
@ -1197,7 +1202,7 @@ Plugin Verifier DSL `runPluginVerifier { ... }` allows to define the list of IDE
#### ideVersions
{id="runpluginverifier-task-ideversions"}
IDEs to check, in [`intellij.version`](#intellij-extension-version) format, i.e.: `["IC-2019.3.5", "PS-2019.3.2"]`.
IDEs to check, in [`intellij.version`](#configuration-intellij-extension-version) format, i.e.: `["IC-2019.3.5", "PS-2019.3.2"]`.
Check the available build versions on [IntelliJ Platform Builds list](https://jb.gg/intellij-platform-builds-list).
{style="narrow"}

View File

@ -239,7 +239,7 @@ 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 `<depends>` tags in <path>plugin.xml</path> or the [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) declaration in the Gradle build script.
Look for the library `Gradle:unzipped.com.jetbrains.plugins:foo:`, where "foo" matches, or is similar to the contents of the `<depends>` tags in <path>plugin.xml</path> or the [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-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-gradle-build-script-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"}

View File

@ -70,11 +70,11 @@ Depending on the chosen development workflow (Gradle or DevKit), one of the two
<tabs>
<tab title="Gradle">
> Please see the [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) property for acceptable values.
> Please see the [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) property for acceptable values.
>
{type="note"}
If the project uses [Gradle](gradle_build_system.md), add the dependency to the [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) parameter in your build script:
If the project uses [Gradle](gradle_build_system.md), add the dependency to the [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) parameter in your build script:
<tabs>
<tab title="Kotlin">

View File

@ -28,7 +28,7 @@ To find the version of the IntelliJ Platform used to build Android Studio, use t
An example is shown below.
In this case, the (BRANCH.BUILD.FIX) version of the IntelliJ Platform is `211.7628.21` marked with the blue rectangle is corresponding to the IntelliJ IDEA version `2021.1.3`.
In your Gradle build script, you should set both versions build number and the release number to the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) property.
In your Gradle build script, you should set both versions build number and the release number to the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) property.
To figure out the exact release number based on the build number, visit the [IntelliJ Repository Releases](https://www.jetbrains.com/intellij-repository/releases/) listing and check the `com.jetbrains.intellij.idea` section.
The [Gradle build script configuration steps](#configuring-the-plugin-gradle-build-script) section below explains how to set the IntelliJ Platform version to match the target version of Android Studio.
@ -50,10 +50,10 @@ The particular example in that section discusses configuring a plugin project fo
Here are the steps to configure the Gradle build script for developing a plugin to target Android Studio:
* The Gradle plugin attributes describing the configuration of the [IntelliJ Platform used to build the plugin project](gradle_guide.md#configuring-the-gradle-intellij-plugin-for-building-intellij-platform-plugin-projects) must be explicitly set.
Continuing with the example [above](#matching-versions-of-the-intellij-platform-with-the-android-studio-version), set the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) value to `191.8026.42`.
Alternatively, specify [`intellij.localPath`](tools_gradle_intellij_plugin.md#intellij-extension-localpath) to refer to a local installation of Android Studio.
Continuing with the example [above](#matching-versions-of-the-intellij-platform-with-the-android-studio-version), set the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) value to `191.8026.42`.
Alternatively, specify [`intellij.localPath`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-localpath) to refer to a local installation of Android Studio.
* Android Studio plugin projects that use APIs from the `android` plugin must declare a dependency on that plugin.
Declare the dependency in the Gradle build script using the [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) attribute, which in this case lists the [directory name](tools_gradle_intellij_plugin.md#intellij-extension-pluginname) of the plugin.
Declare the dependency in the Gradle build script using the [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) attribute, which in this case lists the [directory name](tools_gradle_intellij_plugin.md#configuration-intellij-extension-pluginname) of the plugin.
* The best practice is to use the target version of Android Studio as the IDE Development Instance.
Set the Development Instance to the (user-specific) absolute path to the target Android Studio application.

View File

@ -15,7 +15,7 @@ Plugin projects targeting [AppCode](https://www.jetbrains.com/objc/) can be deve
{type="warning"}
The Gradle configuration of AppCode plugin projects uses neither Product-Specific nor IntelliJ IDEA Attributes.
Instead, configure AppCode plugin projects to use the [`intellij.localPath`](tools_gradle_intellij_plugin.md#intellij-extension-localpath) attribute.
Instead, configure AppCode plugin projects to use the [`intellij.localPath`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-localpath) attribute.
> AppCode plugin development requires installing AppCode locally.
>
@ -26,7 +26,7 @@ Click on an entry in the table's *Attribute* column to go to the documentation a
| `gradle-intellij-plugin` Attribute | Attribute Value |
|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`intellij.localPath`](tools_gradle_intellij_plugin.md#intellij-extension-localpath) | Path to locally installed target version of AppCode. For example, for macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-0/193.5662.55/AppCode.app/Contents</path>. |
| [`intellij.localPath`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-localpath) | Path to locally installed target version of AppCode. For example, for macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-0/193.5662.55/AppCode.app/Contents</path>. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Path to locally installed target version of AppCode. For example, for macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/AppCode/ch-0/193.5662.55/AppCode.app/Contents</path>. |
The dependency on the AppCode APIs must be declared in the <path>plugin.xml</path> file.

View File

@ -22,10 +22,10 @@ Click on an entry in the table's *Attribute* column to go to the documentation a
| `gradle-intellij-plugin` Attribute | Attribute Value |
|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `CL` for the product CLion. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the targeted CLion version, e.g. `2019.3.1`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | No specific declaration is needed. |
| [`intellij.downloadSources`](tools_gradle_intellij_plugin.md#intellij-extension-downloadsources) | `false` is required because no public source code is available. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `CL` for the product CLion. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | Set to the targeted CLion version, e.g. `2019.3.1`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) | No specific declaration is needed. |
| [`intellij.downloadSources`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-downloadsources) | `false` is required because no public source code is available. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Not needed; the Development Instance will automatically match `intellij.type`. |
The dependency on the CLion APIs must be declared in the <path>plugin.xml</path> file.

View File

@ -18,9 +18,9 @@ To see how these attributes appear in a similar Gradle build script for PhpStorm
| `gradle-intellij-plugin` Attribute | Attribute Value |
|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate.<br/>(`IC` is incompatible with the required `DatabaseTools` plugin.) |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | `2019.3` Set to the same version as the DataGrip target version, as set by `runIde.ideDir`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | `DatabaseTools` Dependency on the bundled `DatabaseTools` plugin. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate.<br/>(`IC` is incompatible with the required `DatabaseTools` plugin.) |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | `2019.3` Set to the same version as the DataGrip target version, as set by `runIde.ideDir`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) | `DatabaseTools` Dependency on the bundled `DatabaseTools` plugin. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Path to locally installed target version of DataGrip. For example, for macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/datagrip/ch-0/193.5233.139/DataGrip.app/Contents</path>. |
The dependency on the DataGrip APIs must be declared in the <path>plugin.xml</path> file.

View File

@ -27,11 +27,11 @@ The <path>plugin.xml</path> file is modified to declare the plugin's dependency
## Configuring Gradle Build Script to Target Products Other Than IntelliJ IDEA
The best practice is to use the [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) property to specify the target product.
The best practice is to use the [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) property to specify the target product.
For example, `PY` for PyCharm Professional.
Configuration using an [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) property is explained in the [Product-Specific Attribute](#configuring-plugin-projects-using-a-product-specific-attribute) section below.
Configuration using an [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) property is explained in the [Product-Specific Attribute](#configuring-plugin-projects-using-a-product-specific-attribute) section below.
NOTE: Not all products have an [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) property defined by the [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md), for example, [Android Studio](android_studio.md) and [PhpStorm](phpstorm.md).
NOTE: Not all products have an [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) property defined by the [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md), for example, [Android Studio](android_studio.md) and [PhpStorm](phpstorm.md).
The best approach then is to configure the project using the [IntelliJ IDEA Attribute](#configuring-gradle-build-script-using-the-intellij-idea-product-attribute).
> To target multiple products (e.g., IntelliJ IDEA and PyCharm) with the same plugin, see [](plugin_compatibility.md) page.
@ -40,8 +40,8 @@ The best approach then is to configure the project using the [IntelliJ IDEA Attr
### Configuring Plugin Projects Using a Product-Specific Attribute
If the [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md) supports a target product directly, there will be an [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) property defined.
Specifying the target as a product-specific [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) property has two advantages:
If the [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md) supports a target product directly, there will be an [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) property defined.
Specifying the target as a product-specific [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) property has two advantages:
* The APIs available to the plugin will be limited to only what is defined in the target product.
(Unless additional plugin dependencies are specified.)
* The default [Development Instance](ide_development_instance.md) for running the plugin will be the target product.
@ -116,14 +116,14 @@ This information is used to configure the plugin project's Gradle build script a
#### Configuring Gradle Build Script Using the IntelliJ IDEA Product Attribute
Configuring a Gradle plugin project for using _baseIntelliJPlatformVersion_ requires changing some default settings in the Gradle build script.
Changes need to be made in two places: [`intellij`](tools_gradle_intellij_plugin.md#intellij-extension) extension and [`runIde`](tools_gradle_intellij_plugin.md#tasks-runide) task.
Changes need to be made in two places: [`intellij`](tools_gradle_intellij_plugin.md#configuration-intellij-extension) extension and [`runIde`](tools_gradle_intellij_plugin.md#tasks-runide) task.
The Gradle plugin attributes describing the configuration of the [IntelliJ Platform used to build the plugin project](gradle_guide.md#configuring-the-gradle-intellij-plugin-for-building-intellij-platform-plugin-projects) must be explicitly set in the `intellij` task.
The [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) is `IU` because although the IntelliJ IDEA Community Edition defines the IntelliJ Platform, the PHP plugin is only compatible with IntelliJ IDEA Ultimate.
The [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) is _baseIntelliJPlatformVersion_.
The [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) is `IU` because although the IntelliJ IDEA Community Edition defines the IntelliJ Platform, the PHP plugin is only compatible with IntelliJ IDEA Ultimate.
The [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) is _baseIntelliJPlatformVersion_.
Any [dependencies](gradle_guide.md#plugin-dependencies) on _targetIDE_-specific plugins or modules must be declared in the [`intellij`](tools_gradle_intellij_plugin.md#intellij-extension) extension.
Use the Gradle plugin attribute [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) to declare a dependency.
Any [dependencies](gradle_guide.md#plugin-dependencies) on _targetIDE_-specific plugins or modules must be declared in the [`intellij`](tools_gradle_intellij_plugin.md#configuration-intellij-extension) extension.
Use the Gradle plugin attribute [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) to declare a dependency.
See the specific product pages in _Part VIII — Product Specific_ for the _targetIDE_ plugin or module name.
The best practice is to modify the [`runIde`](tools_gradle_intellij_plugin.md#tasks-runide) task to use a local installation of _targetIDE_ as the [](ide_development_instance.md).

View File

@ -58,9 +58,9 @@ Select a [version](https://plugins.jetbrains.com/plugin/9568-go/versions) of the
| `gradle-intellij-plugin` Attribute | Attribute Value |
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate. The Go plugin isn't compatible with IntelliJ IDEA Community Edition. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the same `IU` BRANCH.BUILD as the GoLand target version, e.g. `193.5233.102`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | `org.jetbrains.plugins.go:193.5233.102.83` for the Go plugin.<br/>See below for Go plugin version information. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate. The Go plugin isn't compatible with IntelliJ IDEA Community Edition. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | Set to the same `IU` BRANCH.BUILD as the GoLand target version, e.g. `193.5233.102`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) | `org.jetbrains.plugins.go:193.5233.102.83` for the Go plugin.<br/>See below for Go plugin version information. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Path to locally installed target version of GoLand. For example, on macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/Goland/ch-0/193.5233.112/GoLand.app/Contents</path>. |
</tab>

View File

@ -30,11 +30,11 @@ To see how these attributes appear in the Gradle build script for PhpStorm, see
| `gradle-intellij-plugin` Attribute | Attribute Value |
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `PS` for PhpStorm. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the targeted `PS` version. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `PS` for PhpStorm. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | Set to the targeted `PS` version. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Not needed; the Development Instance will automatically match `intellij.type`. |
The PHP plugin version is explicitly declared because it isn't bundled with IntelliJ IDEA Ultimate Edition.
Select a [version](https://plugins.jetbrains.com/plugin/6610-php/versions) of the PHP plugin compatible with the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version).
Select a [version](https://plugins.jetbrains.com/plugin/6610-php/versions) of the PHP plugin compatible with the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version).
The dependency on the PHP plugin APIs must be declared in the <path>plugin.xml</path> file, as shown in the tutorial [Configuring plugin.xml](dev_alternate_products.md#configuring-pluginxml) section.

View File

@ -16,10 +16,10 @@ Click on an entry in the table's *Attribute* column to go to the documentation a
| `gradle-intellij-plugin` Attribute | Attribute Value |
|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `PY` for PyCharm Professional Edition, or `PC` for PyCharm Community Edition. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the targeted `PY` or `PC` version. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | `Pythonid` for `PY` / `PythonCore` for `PC`. |
| [`intellij.downloadSources`](tools_gradle_intellij_plugin.md#intellij-extension-downloadsources) | `false` is required because no public source code is available. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `PY` for PyCharm Professional Edition, or `PC` for PyCharm Community Edition. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | Set to the targeted `PY` or `PC` version. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) | `Pythonid` for `PY` / `PythonCore` for `PC`. |
| [`intellij.downloadSources`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-downloadsources) | `false` is required because no public source code is available. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Not needed; the Development Instance will automatically match `intellij.type`. |
The dependency on the PyCharm APIs must be declared in the <path>plugin.xml</path> file.

View File

@ -19,9 +19,9 @@ To see how these attributes appear in a similar Gradle build script for PhpStorm
| `gradle-intellij-plugin` Attribute | Attribute Value |
|----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | Set to the same `IU` BRANCH.BUILD as the RubyMine target version, e.g. `192.7142.36`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | `org.jetbrains.plugins.ruby:2019.2.20191029` for the Ruby plugin.<br/>See below for Ruby plugin version information. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate. |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | Set to the same `IU` BRANCH.BUILD as the RubyMine target version, e.g. `192.7142.36`. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) | `org.jetbrains.plugins.ruby:2019.2.20191029` for the Ruby plugin.<br/>See below for Ruby plugin version information. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Path to locally installed target version of RubyMine. For example, on macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/RubyMine/ch-0/192.7142.37/RubyMine.app/Contents</path>. |
The required `org.jetbrains.plugins.ruby` plugin isn't compatible with IntelliJ IDEA Community edition but is compatible with IntelliJ IDEA Ultimate (`IU`) edition.

View File

@ -22,9 +22,9 @@ To see how these attributes appear in a similar Gradle build script for PhpStorm
| `gradle-intellij-plugin` Attribute | Attribute Value |
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate.<br/>(`IC` is incompatible with the required `JavaScriptLanguage` plugin) |
| [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) | `192.7142.36` Set to the same BRANCH.BUILD as the WebStorm target version. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins) | Dependency on the `JavaScriptLanguage` plugin. |
| [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) | `IU` for IntelliJ IDEA Ultimate.<br/>(`IC` is incompatible with the required `JavaScriptLanguage` plugin) |
| [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) | `192.7142.36` Set to the same BRANCH.BUILD as the WebStorm target version. |
| [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins) | Dependency on the `JavaScriptLanguage` plugin. |
| [`runIde.ideDir`](tools_gradle_intellij_plugin.md#tasks-runide-idedir) | Path to locally installed target version of WebStorm. For example, for macOS:<br/><path>/Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/WebStorm/ch-0/192.7142.35/WebStorm.app/Contents</path>. |
The dependency on the WebStorm APIs must be declared in the <path>plugin.xml</path> file.

View File

@ -34,19 +34,19 @@ IntelliJ IDEA then indexes the build and any associated source code and JetBrain
#### IntelliJ Platform Configuration
Explicitly setting the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) and [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) properties tells the Gradle plugin to use that configuration of the IntelliJ Platform to create the plugin project.
Explicitly setting the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) and [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) properties tells the Gradle plugin to use that configuration of the IntelliJ Platform to create the plugin project.
All available platform versions can be browsed in the [](intellij_artifacts.md).
If the chosen platform version is not available in the repositories, or a local installation of the target IDE is the desired type and version of the IntelliJ Platform, use [`intellij.localPath`](tools_gradle_intellij_plugin.md#intellij-extension-localpath) to point to that installation.
If the [`intellij.localPath`](tools_gradle_intellij_plugin.md#intellij-extension-localpath) attribute is set, do not set the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) and [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) attributes as this could result in undefined behavior.
If the chosen platform version is not available in the repositories, or a local installation of the target IDE is the desired type and version of the IntelliJ Platform, use [`intellij.localPath`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-localpath) to point to that installation.
If the [`intellij.localPath`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-localpath) attribute is set, do not set the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) and [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) attributes as this could result in undefined behavior.
#### Plugin Dependencies
IntelliJ Platform plugin projects may depend on either bundled or third-party plugins.
In that case, a project should build against a version of those plugins that match the IntelliJ Platform version used to build the plugin project.
The Gradle plugin will fetch any plugins in the list defined by [`intellij.plugins`](tools_gradle_intellij_plugin.md#intellij-extension-plugins).
See the Gradle plugin [IntelliJ Extension](tools_gradle_intellij_plugin.md#intellij-extension) for information about specifying the plugin and version.
The Gradle plugin will fetch any plugins in the list defined by [`intellij.plugins`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins).
See the Gradle plugin [IntelliJ Extension](tools_gradle_intellij_plugin.md#configuration-intellij-extension) for information about specifying the plugin and version.
Note that this attribute describes a dependency so that the Gradle plugin can fetch the required artifacts.
The runtime dependency must be added in the [Plugin Configuration](plugin_configuration_file.md) (<path>plugin.xml</path>) file as described in [Plugin Dependencies](plugin_dependencies.md#3-dependency-declaration-in-pluginxml).
@ -73,12 +73,12 @@ The Gradle plugin will fetch the specified JetBrains Runtime as needed.
There are several attributes to control where the Gradle plugin places directories for downloads and use by the IDE Development Instance.
The location of the [sandbox home](ide_development_instance.md#the-development-instance-sandbox-directory) directory and its subdirectories can be controlled with Gradle plugin attributes.
The [`intellij.sandboxDirectory`](tools_gradle_intellij_plugin.md#intellij-extension-sandboxdir) attribute is used to set the path for the sandbox directory to be used while running the plugin in an IDE Development Instance.
The [`intellij.sandboxDirectory`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-sandboxdir) attribute is used to set the path for the sandbox directory to be used while running the plugin in an IDE Development Instance.
Locations of the sandbox [subdirectories](ide_development_instance.md#development-instance-settings-caches-logs-and-plugins) can be controlled using the [`runIde.configDirectory`](tools_gradle_intellij_plugin.md#tasks-runide), [`runIde.pluginsDirectory`](tools_gradle_intellij_plugin.md#tasks-runide), and [`runIde.systemDirectory`](tools_gradle_intellij_plugin.md#tasks-runide) attributes.
If the [`intellij.sandboxDirectory`](tools_gradle_intellij_plugin.md#intellij-extension-sandboxdir) path is explicitly set, the subdirectory attributes default to the new sandbox directory.
If the [`intellij.sandboxDirectory`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-sandboxdir) path is explicitly set, the subdirectory attributes default to the new sandbox directory.
The storage location of downloaded IDE versions and components defaults to the Gradle cache directory.
However, it can be controlled by setting the [`intellij.ideaDependencyCachePath`](tools_gradle_intellij_plugin.md#intellij-extension-ideadependencycachepath) attribute.
However, it can be controlled by setting the [`intellij.ideaDependencyCachePath`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-ideadependencycachepath) attribute.
### Controlling Downloads by the Gradle Plugin
@ -94,13 +94,13 @@ The version of Gradle is defined in <path>$PROJECT_ROOT$/gradle/wrapper/gradle-w
A plugin project's <path>plugin.xml</path> file has element values that are "patched" at build time from the attributes of the [`patchPluginXml`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml) task.
As many as possible of the attributes in the Patching DSL will be substituted into the corresponding element values in a plugin project's <path>plugin.xml</path> file:
* If a [`patchPluginXml`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml) attribute default value is defined, the attribute value will be patched in <path>plugin.xml</path> _regardless of whether the [`patchPluginXml`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml) task appears in the Gradle build script_.
* For example, the default values for the attributes [`patchPluginXml.sinceBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-sincebuild) and [`patchPluginXml.untilBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-untilbuild) are defined based on the declared (or default) value of [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version).
* For example, the default values for the attributes [`patchPluginXml.sinceBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-sincebuild) and [`patchPluginXml.untilBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-untilbuild) are defined based on the declared (or default) value of [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version).
So by default [`patchPluginXml.sinceBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-sincebuild) and [`patchPluginXml.untilBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-untilbuild) are substituted into the `<idea-version>` element's `since-build` and `until-build` attributes in the <path>plugin.xml</path> file.
* If a [`patchPluginXml`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml) attribute value is explicitly defined, the attribute value will be substituted in <path>plugin.xml</path>.
* If both [`patchPluginXml.sinceBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-sincebuild) and [`patchPluginXml.untilBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-untilbuild) attributes are explicitly set, both are substituted in <path>plugin.xml</path>.
* If one attribute is explicitly set (e.g. [`patchPluginXml.sinceBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-sincebuild)) and one is not (e.g. [`patchPluginXml.untilBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-untilbuild) has a default value,) both attributes are patched at their respective (explicit and default) values.
* For **no substitution** of the `<idea-version>` element's `since-build` and `until-build` attributes, one of the following must appear in the Gradle build script:
* Either set [`intellij.updateSinceUntilBuild`](tools_gradle_intellij_plugin.md#intellij-extension-updatesinceuntilbuild) to `false`, which will disable substituting both `since-build` and `until-build` attributes,
* Either set [`intellij.updateSinceUntilBuild`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-updatesinceuntilbuild) to `false`, which will disable substituting both `since-build` and `until-build` attributes,
The best practice to avoid confusion is to replace the elements in <path>plugin.xml</path> that will be patched by the Gradle plugin with a comment.
That way, the values for these parameters do not appear in two places in the source code.
@ -142,7 +142,7 @@ This section reviews some of the more common configurations.
IntelliJ Platform plugins targeting IntelliJ IDEA have the most straightforward Gradle plugin configuration.
* Determine the version of [IntelliJ IDEA to use for building the plugin project](#configuring-the-gradle-intellij-plugin-for-building-intellij-platform-plugin-projects); this is the desired version of the IntelliJ Platform.
This can be EAP (default) or determined from the [build number ranges](build_number_ranges.md).
* If a production version of IntelliJ IDEA is the desired target, set the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) property accordingly.
* If a production version of IntelliJ IDEA is the desired target, set the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) property accordingly.
* Set the necessary [plugin dependencies](#plugin-dependencies), if any.
* If the plugin project should be run or debugged in an IDE Development Instance based on the same IntelliJ IDEA version, no further attributes need to be set for the IDE Development Instance.
This is the default behavior and is the most common use case.

View File

@ -127,8 +127,8 @@ tasks {
* The [Gradle IntelliJ Plugin](tools_gradle_intellij_plugin.md).
* The <control>Group</control> from the [New Project](#create-ide-plugin) wizard is the `project.group` value.
* The `sourceCompatibility` line is injected to enforce using Java 11 JDK to compile Java sources.
* The values of the [`intellij.version`](tools_gradle_intellij_plugin.md#intellij-extension-version) and [`intellij.type`](tools_gradle_intellij_plugin.md#intellij-extension-type) properties specify the version and type of the IntelliJ Platform to be used to build the plugin.
* The empty placeholder list for [plugin dependencies](tools_gradle_intellij_plugin.md#intellij-extension-plugins).
* The values of the [`intellij.version`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-version) and [`intellij.type`](tools_gradle_intellij_plugin.md#configuration-intellij-extension-type) properties specify the version and type of the IntelliJ Platform to be used to build the plugin.
* The empty placeholder list for [plugin dependencies](tools_gradle_intellij_plugin.md#configuration-intellij-extension-plugins).
* The values of the [`patchPluginXml.sinceBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-sincebuild) and [`patchPluginXml.untilBuild`](tools_gradle_intellij_plugin.md#tasks-patchpluginxml-untilbuild) properties specifying the minimum and maximum versions of the IDE build the plugin is compatible with.
* The initial [`signPlugin`](tools_gradle_intellij_plugin.md#tasks-signplugin) and [`publishPlugin`](tools_gradle_intellij_plugin.md#tasks-publishplugin) tasks configuration.
See the [](deployment.md) section for more information.