# Configuring Gradle IntelliJ Plugin (1.x)

> For the complete documentation index, see [llms.txt](https://plugins.jetbrains.com/docs/intellij/llms.txt).

This page presents a guided tour of Gradle plugin attributes to achieve the commonly desired functionality. For more advanced options, see the full [Gradle IntelliJ Plugin (1.x)](tools-gradle-intellij-plugin.html) reference.

> **Warning: Obsolescence Notice**
> Gradle IntelliJ Plugin (1.x) is no longer under active development.
>
>
>
> Whenever possible, use [IntelliJ Platform Gradle Plugin (2.x)](tools-intellij-platform-gradle-plugin.html) instead.

> **Warning: Gradle Plugin**
> The Gradle plugin must be chosen depending on the target [platform version](build-number-ranges.html#platformVersions).
>
>
>
>
> 2024.2+
> : Requires [IntelliJ Platform Gradle Plugin (2.x)](tools-intellij-platform-gradle-plugin.html)
>
>
> 2022.3+
> : Recommended [IntelliJ Platform Gradle Plugin (2.x)](tools-intellij-platform-gradle-plugin.html)
> :
> :
> :
> : Requires [Gradle IntelliJ Plugin (1.x)](tools-gradle-intellij-plugin.html) (Obsolete) 1.10.1+

## Keep Up To Date

Gradle IntelliJ Plugin and [Gradle](https://gradle.org/install/) build system are constantly developed, and every new release brings important bug fixes, new features, and improvements that makes the development more efficient. It is strongly recommended to keep updating both Gradle and Gradle IntelliJ Plugin to the latest versions. Newer IDE releases might not be supported fully in older releases of Gradle IntelliJ Plugin.

> **Note:**
> Current Gradle IntelliJ Plugin version is 1.17.4

## Target Platform and Dependencies

> **Tip: Which versions should a plugin support?**
> For new plugins, it is recommended to support current and previous stable versions. For example, if the current platform version is 2026.3.*, start developing the plugin by targeting 2026.2.*. This will support:
>
>
>
> * 2026.3.* - current major version
>
> * 2026.2.* - previous major version
>
>
>
> With this approach, plugins can use modern APIs, which makes them more performant.
>
>
>
> After the plugin is released, it is not strictly required to update plugin to support only two latest major versions. Consider supporting some older versions based on download statistics in [Statistics: Product Versions in Use](https://plugins.jetbrains.com/docs/marketplace/product-versions-in-use-statistics.html).

By default, the Gradle plugin will build a plugin project against the IntelliJ Platform defined by the latest EAP snapshot of the IntelliJ IDEA.

If a matching version of the specified IntelliJ Platform is not available on the local machine, the Gradle plugin downloads the correct version and type. IntelliJ IDEA then indexes the build and any associated source code and JetBrains Java Runtime.

To build a plugin for more than one target platform version, see [Targeting Multiple IDE Versions](build-number-ranges.html#multipleIDEVersions) for important notes.

### IntelliJ Platform Configuration

Explicitly setting the [intellij.version](tools-gradle-intellij-plugin.html#intellij-extension-version) and [intellij.type](tools-gradle-intellij-plugin.html#intellij-extension-type) properties tells the Gradle plugin to use that configuration of the IntelliJ Platform to create the plugin project.

> **Tip:**
> See the [Developing for Multiple Products](dev-alternate-products.html) page for information about how to develop a plugin that is compatible with multiple IntelliJ-based IDEs.

All available platform versions can be browsed in the [IntelliJ Platform Artifacts Repositories](intellij-artifacts.html).

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.html#intellij-extension-localpath) to point to that installation. If the `intellij.localPath` attribute is set, do not set the `intellij.version` and `intellij.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.html#intellij-extension-plugins). See the Gradle plugin [IntelliJ Extension](tools-gradle-intellij-plugin.html#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.html) (`plugin.xml`) file as described in [Plugin Dependencies](plugin-dependencies.html#dependency-declaration-in-pluginxml).

## Run IDE Task

By default, the Gradle plugin will use the same version of the IntelliJ Platform for the IDE Development Instance as was used for building the plugin. Using the corresponding JetBrains Runtime is also the default, so for this use-case no further configuration is required.

### Running Against Alternate Versions and Types of IntelliJ Platform-Based IDEs

The IntelliJ Platform IDE used for the [Development Instance](ide-development-instance.html) can be different from that used to build the plugin project. Setting the [runIde.ideDir](tools-gradle-intellij-plugin.html#tasks-runide-idedir) property will define an IDE to be used for the Development Instance. This attribute is commonly used when running or debugging a plugin in an [alternate IntelliJ Platform-based IDE](intellij-platform.html#ides-based-on-the-intellij-platform).

### Running Against Alternate Versions of the JetBrains Runtime

Every version of the IntelliJ Platform has a corresponding version of the [JetBrains Runtime](ide-development-instance.html#using-a-jetbrains-runtime-for-the-development-instance). A different version of the runtime can be used by specifying the [runIde.jbrVersion](tools-gradle-intellij-plugin.html#tasks-runide-jbrversion) attribute, describing a version of the JetBrains Runtime that should be used by the IDE Development Instance. The Gradle plugin will fetch the specified JetBrains Runtime as needed.

## Patching the Plugin Configuration File

A plugin project's `plugin.xml` file has element values that are "patched" at build time from the attributes of the [patchPluginXml](tools-gradle-intellij-plugin.html#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 `plugin.xml` file:

* If a `patchPluginXml` attribute default value is defined, the attribute value will be patched in `plugin.xml` regardless of whether the `patchPluginXml` task appears in the Gradle build script. * For example, the default values for the attributes [patchPluginXml.sinceBuild](tools-gradle-intellij-plugin.html#tasks-patchpluginxml-sincebuild) and [patchPluginXml.untilBuild](tools-gradle-intellij-plugin.html#tasks-patchpluginxml-untilbuild) are defined based on the declared (or default) value of [intellij.version](tools-gradle-intellij-plugin.html#intellij-extension-version). So by default `patchPluginXml.sinceBuild` and `patchPluginXml.untilBuild` are substituted into the [&lt;idea-version&gt;](plugin-configuration-file.html#idea-plugin__idea-version) element's `since-build` and `until-build` attributes in the `plugin.xml` file.

* If a [patchPluginXml](tools-gradle-intellij-plugin.html#tasks-patchpluginxml) task's attribute value is explicitly defined, the attribute value will be substituted in `plugin.xml`. * If both `patchPluginXml.sinceBuild` and `patchPluginXml.untilBuild` attributes are explicitly set, both are substituted in `plugin.xml`. * If one attribute is explicitly set (e.g. `patchPluginXml.sinceBuild`) and one is not (e.g. `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, set [intellij.updateSinceUntilBuild](tools-gradle-intellij-plugin.html#intellij-extension-updatesinceuntilbuild) to `false`, and do not provide `patchPluginXml.sinceBuild` and `patchPluginXml.untilBuild` values.

The best practice to avoid confusion is to replace the elements in `plugin.xml` 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. The Gradle plugin will add the necessary elements as part of the patching process. For those [patchPluginXml](tools-gradle-intellij-plugin.html#tasks-patchpluginxml) attributes that contain descriptions such as [patchPluginXml.changeNotes](tools-gradle-intellij-plugin.html#tasks-patchpluginxml-changenotes) and [patchPluginXml.pluginDescription](tools-gradle-intellij-plugin.html#tasks-patchpluginxml-plugindescription), a `CDATA` block is not necessary when using HTML elements.

> **Tip:**
> To maintain and generate an up-to-date changelog, try using [Gradle Changelog Plugin](https://github.com/JetBrains/gradle-changelog-plugin).

The Gradle properties `project.version`, `project.group`, and `rootProject.name` are all generated based on the input to the Wizard. However, the [Gradle IntelliJ Plugin (1.x)](tools-gradle-intellij-plugin.html) does not combine and substitute those Gradle properties for the default [&lt;id&gt;](plugin-configuration-file.html#idea-plugin__id) and [&lt;name&gt;](plugin-configuration-file.html#idea-plugin__name) elements in the `plugin.xml` file.

The best practice is to keep `project.version` current. By default, the Gradle plugin will automatically update the [&lt;version&gt;](plugin-configuration-file.html#idea-plugin__version) value in the `plugin.xml` file to match `project.version` from the Gradle build script. This practice keeps all version declarations synchronized.

## Verifying Plugin

The Gradle plugin provides tasks that allow for running integrity and compatibility tests:

* [verifyPluginConfiguration](tools-gradle-intellij-plugin.html#tasks-verifypluginconfiguration) - validates the versions of SDK, target platform, APIs, etc., configured in a plugin project,

* [verifyPlugin](tools-gradle-intellij-plugin.html#tasks-verifyplugin) - validates completeness and contents of `plugin.xml` descriptors as well as plugin's archive structure,

* [runPluginVerifier](tools-gradle-intellij-plugin.html#tasks-runpluginverifier) - runs the [IntelliJ Plugin Verifier](https://github.com/JetBrains/intellij-plugin-verifier) tool to check the binary compatibility with specified IntelliJ IDE builds.

Plugin Verifier integration task allows for configuring the exact IDE versions that the plugin will be checked against. See [Plugin Verifier](verifying-plugin-compatibility.html#plugin-verifier) for more information.

## Publishing Plugin

Please review the [Publishing a Plugin](publishing-plugin.html) page before using the [publishPlugin](tools-gradle-intellij-plugin.html#tasks-publishplugin) task. That documentation explains different ways to use Gradle for plugin uploads without exposing account credentials.

