Dependencies Extension
IntelliJ Platform Gradle Plugin enhances the dependencies {} configuration block by applying a nested dependencies.intellijPlatform {} extension.
This class provides methods for adding dependencies to different IntelliJ Platform products and managing local dependencies.
It also includes methods for adding plugins (including bundled), JetBrains Runtime, as well as tools like IntelliJ Plugin Verifier and Marketplace ZIP Signer.
Example:
setup Maven Central and
defaultRepositories()target IntelliJ IDEA 2026.3
add dependency on the bundled Java plugin
add a JUnit4 test dependency
add Test Framework for testing a plugin with JUnit4
Target Platforms
All product helpers accept version as either a String or a Provider<String> and an optional dependency configuration callback.
Default Target Platforms
See Custom Target Platforms for non-default targets.
Function | Description |
|---|---|
| |
| |
| |
| |
| Fleet Backend |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
Notes:
Writerside (
WRS) is deprecated and no longer available as a target IntelliJ Platform.Aqua (
QA) is deprecated and no longer available as a target IntelliJ Platform.IntelliJ IDEA Community (
IC) and Ultimate (IU) legacy helpers remain available for versions earlier than 2025.3.PyCharm Community (
PC) and Professional (PY) legacy helpers remain available for versions earlier than 2025.3.
Legacy Target Platform Helpers
The following helpers are still available for resolving pre-2025.3 product lines:
Function | Description |
|---|---|
| IntelliJ IDEA Community ( |
| IntelliJ IDEA Ultimate ( |
| PyCharm Community ( |
| PyCharm Professional ( |
Custom Target Platforms
Function | Description |
|---|---|
| Adds a configurable dependency on the IntelliJ Platform. See Parametrize IntelliJ Platform Dependency. |
| Adds a dependency configured entirely through an |
| Adds a dependency from an existing |
| Adds a dependency on a local IntelliJ Platform instance. See Local IntelliJ Platform IDE Instance. |
| Adds a local IntelliJ Platform dependency to the named configuration. This overload requires a |
For create(type, version), type accepts an IntelliJPlatformType or a product code such as "IU". The supported argument combinations are a direct type and version, a direct type and a version provider, or providers for both arguments. When using create { ... }, set both type and version in the configuration callback. JetBrains Client has no dedicated product helper; use create(IntelliJPlatformType.JetBrainsClient, version) or request ProductMode.FRONTEND.
local(localPath) accepts a String, File, Path, Directory, or a provider of one of these types. The path must point to an existing IDE installation directory, not an archive. On macOS, a path ending in .app is resolved to its Contents directory. By default, the dependency is added to intellijPlatformLocal. The custom configurationName overload changes the dependency destination, not the main platform request configuration.
Dependency Configuration Parameters
The optional configure callback on the target-platform helpers configures an IntelliJPlatformDependencyConfiguration:
Parameter | Type | Description |
|---|---|---|
|
| The target product. Set by the product helper or the |
|
| The IntelliJ Platform version. Set by the helper's |
|
| The requested product mode. Default: |
|
| Selects an IDE installer ( |
|
| Uses the managed IDE cache instead of the Gradle cache. Inherits |
All properties support assignment of direct values and Provider instances. The managed cache location is configured with intellijPlatform.caching.ides.path.
When productMode = ProductMode.FRONTEND, the dependency resolves the matching JetBrains Client installer, regardless of useInstaller. When splitMode is enabled or a non-MONOLITH productMode is requested, the IDE is extracted into the managed IDE cache even if useCache is disabled.
See also:
Target Versions
The IntelliJ Platform Gradle Plugin allows for using two types of IntelliJ Platform artifacts for development: installers and multi-OS ZIP archives. Installers are the default for most products, while Rider defaults to multi-OS archives. The plugin currently warns against Rider installers (useInstaller = true); retain the archive default. Not every product offers both formats; see the IntelliJPlatformType reference. Fleet Backend has Maven archive coordinates only and cannot be resolved as an installer. Use useInstaller = false for Fleet Backend.
Latest Installer
Use "latest" as the platform version, for example, intellijIdea("latest"), to select the newest listed installer for the requested product type. Selection compares build numbers across all release channels, so the result may be an EAP release rather than a stable release. This selector requires useInstaller = true; it cannot be used with multi-OS archives. When the managed IDE cache is used, it receives the resolved concrete version instead of "latest".
Installers
When declaring a dependency on IntelliJ Platform with useInstaller = true, the IDE installer is resolved. The IntelliJ Platform installer is the IDE final distribution used by end-users for installing and running IDE in their machines. Those artifacts are resolved from JetBrains Download CDN (download.jetbrains.com) or Android Studio CDN.
Available installers can be listed by executing the printProductsReleases task. Installer download URLs are resolved from product release metadata.
IntelliJ Platform installers are OS- and architecture-specific and contain bundled JetBrains Runtime (JBR). Published EAP installers can also be used.
To apply required repositories, use Default Repositories or explicit IntelliJ Platform Installers helpers.
Multi-OS Archives
It is still possible to use Multi-OS ZIP archives resolved from IntelliJ Maven Repositories.
To enable resolving this kind of artifacts, opt out from installer dependencies by setting useInstaller = false in the helper configuration:
The Multi-OS Archives don't bundle JetBrains Runtime (JBR) needed to run the IDE locally, perform testing, and other crucial operations. The automatic runtime dependency uses the runtime version declared by the IDE when available. The JetBrains Runtime repository must also be configured, either through defaultRepositories() or the jetbrainsRuntime() repository helper. Use an explicit runtime dependency if the IDE does not declare a runtime version.
It is advised to rely on installer releases, but targeting EAP multi-OS archives helps when making sure the plugin will work in the upcoming IDE releases.
To apply required repositories, use Default Repositories or explicit IntelliJ Maven Repositories helpers.
Latest Version
Set the version of an installer-based IntelliJ Platform dependency to "latest" (or the Constraints.LATEST_VERSION constant) to resolve the newest available release for the requested platform type. The version is resolved from the product releases listing across all channels for the requested type, picking the newest matching release by build number:
The "latest" version works only with the installer distribution (the default useInstaller = true); combining it with useInstaller = false fails the build.
The same version value can be used for custom testing configurations registered with intellijPlatformTesting:
Plugins
Make sure that required plugin repositories are defined to access non-bundled plugins.
See also:
Bundled Plugin
Use bundledPlugin(id) or bundledPlugins(ids) to add a dependency on the bundled plugin within the currently targeted IntelliJ Platform. The list of bundled plugin IDs is available via printBundledPlugins task.
Function | Description |
|---|---|
| Adds a dependency on a bundled plugin. |
| Adds a dependency on multiple bundled plugins. |
The singular helper accepts a String or Provider<String>. The plural helper accepts varargs, a List<String>, or a Provider<List<String>>. Required bundled plugin and module dependencies are resolved transitively.
Bundled Modules
Use bundledModule(id) or bundledModules(ids) to add a dependency on an IntelliJ Platform bundled module. This is useful when a specific platform module is required on the classpath. The id value can be either a bundled module ID or a module alias exported by the target IDE, for example com.intellij.modules.vcs.
Function | Description |
|---|---|
| Adds a dependency on a bundled module or module alias. |
| Adds dependencies on multiple bundled modules or aliases. |
The singular helper accepts a String or Provider<String>. The plural helper accepts varargs, a List<String>, or a Provider<List<String>>. Use a module helper rather than bundledPlugin() when the requested entry is a classpath-backed module without a plugin archive.
Non-Bundled Plugin
Use plugin(notation) or plugins(notations) to add a dependency on a non-bundled plugin (for example, hosted on JetBrains Marketplace).
Parameter notation uses the following format:
pluginId:versionorpluginId:version@channel.
Alternatively, use:
plugin(id, version, group)– wheregroupmay define a release channel, like@eap, or a full Maven coordinates group (defaults tocom.jetbrains.plugins). These arguments can be direct strings or providers of strings.plugins(vararg notations),plugins(List<String>), orplugins(Provider<List<String>>)– for multiple plugins.
For the separate-argument form, id and version must both be direct strings or both be providers. If group is supplied, use the same form for that argument as well.
The group parameter can also describe the release channel by prefixing the value with @ character, like @eap or @nightly. The channel value is used to prepend the JetBrains Marketplace group and build nightly.com.jetbrains.plugins.
If defined explicitly, can be used along with any custom plugin repository, like org.acme.plugins.
Function | Description |
|---|---|
| Adds a dependency on a plugin. |
| Adds a dependency using a |
| Adds dependencies on multiple plugins without a configuration callback. |
Plugin Library Exclusions
A non-bundled plugin may ship libraries in its lib/ and lib/modules/ directories that conflict with libraries provided by the target IntelliJ Platform or the developed plugin.
The optional configure callback on plugin() and testPlugin() accepts an Action<IntelliJPlatformPluginConfiguration>. Use it to exclude packaged libraries with Gradle's Ant-style patterns, relative to the plugin's lib/ and lib/modules/ directories, such as jena-*.jar:
Function | Description |
|---|---|
| Excludes matching library files from the declared plugin. |
| Adds multiple library exclusion patterns. |
Exclusions apply to the plugin's classpath and its sandbox copy, including matching libraries under lib/modules/. Rules are associated with the plugin ID and do not exclude libraries from other plugins. Patterns declared for the same plugin ID are combined build-wide. The filtered plugin must retain a valid plugin descriptor; excluding the JAR containing it causes a failure.
In Groovy, the separate-argument form with a callback requires an explicit group argument, for example, plugin('org.example.plugin', '1.0', 'com.jetbrains.plugins') { ... }. The notation form shown above does not require that extra argument.
The same configuration block is available for the test-scope testPlugin() helpers.
Compatible Plugins
Helpers that automatically pick a version compatible with the currently configured IntelliJ Platform by requesting the JetBrains Marketplace API. These helpers are incubating.
These resolve plugin versions against the target platform configured via this extension. Make sure the required plugin repositories are defined.
Function | Description |
|---|---|
| Adds a dependency on a compatible plugin. |
| Adds a dependency on multiple compatible plugins. |
The singular helper accepts a String or Provider<String>. The plural helper accepts varargs, a List<String>, or a Provider<List<String>>. Resolution fails if JetBrains Marketplace has no compatible update for a requested plugin ID.
Multi-Module Setup
When working on a multi-module project, use pluginComposedModule(dependency) to add a dependency on a plugin module to be bundled within the main plugin JAR. This will produce a single plugin Jar file with all submodules' classes composed:
In order to use the plugin model v2, use the pluginModule(dependency) instead, which will move the submodule's jar into the lib/modules/ subdirectory.
Both helpers accept a Gradle Dependency; a null dependency is ignored.
Local Plugin
Use localPlugin(localPath) to add a dependency on a local IntelliJ Platform plugin. It accepts a String, File, or Directory pointing to a plugin directory or archive, or a provider supplying a String, File, Path, or Directory. The localPlugin(dependency) overload accepts a Gradle ProjectDependency.
Testing
Use testFramework() or testFrameworks() to explicitly add test framework libraries and their test base classes. For general IntelliJ Platform tests, use TestFrameworkType.Platform:
See TestFrameworkType reference for other test-frameworks, for example, Plugin.Java when testing Java-based functionality.
The provided helpers make it possible to add the base artifact to the test classpath or its variants, such as Java, Go, ReSharper, etc.
Function | Description |
|---|---|
| Adds the requested |
| Adds all requested Test Framework variants using build-compatible versions. |
| Adds all Test Framework variants in the list using build-compatible versions. |
testFramework() accepts version as a String or Provider<String>. The default version selector is Constants.Constraints.CLOSEST_VERSION; see Dependency Version Selection. The default configurationName is intellijPlatformTestDependencies. In Groovy, the provider-based version overload requires all three arguments, including the configuration name. Published framework dependencies exclude transitive modules already supplied by the target IDE.
testFrameworks()
Use either testFrameworks() overload to add multiple Test Framework variants at once:
The plural overloads do not accept an explicit version. To request a specific version or configuration, call testFramework() separately. For TestFrameworkType.Bundled, the JAR is taken directly from the IDE and version is not used.
There are two known issues related to Platform and JUnit5 Test Frameworks:
See also:
Test-scope plugin and module helpers
The extension also provides helpers to add dependencies needed only for tests:
Function | Description |
|---|---|
| Adds a test dependency on a non-bundled plugin using |
| Adds a test dependency on a plugin. |
| Adds test dependencies on multiple non-bundled plugins. |
| Adds a test dependency on a bundled plugin by ID. |
| Adds test dependencies on multiple bundled plugins by IDs. |
| Adds a test dependency on a local plugin; accepts a path or a project dependency. |
| Adds a test dependency on a specific bundled platform module or module alias. |
| Adds test dependencies on multiple bundled platform modules or aliases. |
testPlugin() supports the same direct-string, provider, and library exclusion overloads as plugin(). testPlugins(), testBundledPlugins(), and testBundledModules() each accept varargs, a list, or a provider of a list. The singular bundled helpers accept a string or provider of a string. testLocalPlugin() accepts the same path types and project dependency overload as localPlugin(); it does not have a list overload. The testPlugin(...) helpers also accept the same configuration block as plugin(...) for excluding libraries bundled with the plugin.
Sandbox Runtime Classpaths
The plugin uses dedicated resolvable configurations for dependencies copied to the developed plugin's lib/ directory in a sandbox:
Configuration | Description |
|---|---|
| Extends the project's |
| Extends |
Excluding a dependency from either configuration changes only the contents of the corresponding sandbox. It does not remove the dependency from the project's compile, runtime, or test classpaths. Because the test sandbox configuration extends the regular sandbox configuration, exclusions added to intellijPlatformSandboxRuntimeClasspath apply to both regular and test sandboxes. Configure intellijPlatformTestSandboxRuntimeClasspath instead when an exclusion should apply only to test sandboxes.
For example, the following keeps Joda-Time available to compile the plugin but prevents its JAR from being copied into either sandbox:
By default, both sandbox configurations exclude org.jetbrains.kotlin:kotlin-stdlib, org.jetbrains.kotlin:kotlin-stdlib-jdk8, and the known Kotlin Coroutines modules supplied by the IntelliJ Platform. The Coroutines exclusions cover the org.jetbrains.kotlinx, com.intellij.platform, and org.jetbrains.intellij.deps.kotlinx groups. Set org.jetbrains.intellij.platform.useDefaultSandboxExclusions=false to opt out.
Native Files
OS- and architecture-specific native executables and libraries are configured through intellijPlatform.nativeVariants, not a separate dependency helper. Each target exposes a ConfigurableFileCollection for its files. See Variant for the supported OS and architecture identifiers.
Tools
Function | Description |
|---|---|
| Adds a dependency on IntelliJ Plugin Verifier. Applied by default with the |
| Adds a dependency on Marketplace ZIP Signer. Applied by default with the |
| SEE NOTE BELOW Adds a dependency on a bundled library JAR file of the current IntelliJ Platform, like lib/annotations.jar. |
| Adds a custom IntelliJ Platform dependency from the IntelliJ Maven Repositories. |
| Adds a test dependency on a custom IntelliJ Platform artifact. |
Tool versions accept a String or Provider<String>. The bundledLibrary() path accepts a String or Provider<String> and is relative to the IDE installation directory.
For platformDependency() and testPlatformDependency(), coordinates is a Coordinates value, not a Gradle dependency notation string. The default version is the closest available version in the target IDE's build branch that is not newer than the IDE build. Nightly platform dependencies use the requested platform version instead; see Dependency Version Selection. Transitive dependencies already supplied by the target IDE are excluded.
Helper | Default |
|---|---|
|
|
|
|
configurationName selects the dependency destination; version selection and transitive exclusions still use the main target IntelliJ Platform. The version argument accepts a String or Provider<String>. In Groovy, the provider-based overload requires all three arguments, including configurationName.
See also:
Dependency Version Selection
The tool and platform artifact helpers use Gradle version constraints:
Selector | Behavior | Default for |
|---|---|---|
| Restricts versions to the target IDE's build branch, no newer than the IDE build, and prefers that build. |
|
| Prefers the requested platform version. | Used in place of |
| Applies |
|
An explicit tool or platform artifact version is set with Gradle's prefer() constraint, not a strict version pin. The target-platform "latest" selector is different: it selects a concrete installer from product release metadata.
Java Runtime
Using the jetbrainsRuntime() or jetbrainsRuntimeExplicit() dependency helpers, it is possible to load a custom version of JetBrains Runtime. However, it is recommended to rely on the runtime bundled within the IntelliJ Platform dependency, if present.
The jetbrainsRuntime() helper is applied by default when a separate runtime is needed. It reads runtimeBuild, falling back to jdkBuild, from the IDE's dependencies.txt file. If no runtime version can be obtained, this helper adds no dependency; use an explicit version or a local runtime instead.
Function | Description |
|---|---|
| Adds a dependency on JetBrains Runtime in version obtained with the current IntelliJ Platform if resolved from IntelliJ Maven Repository. |
| Builds an OS-specific runtime version from a version such as |
| Adds a dependency on a local JetBrains Runtime instance. |
| Adds a dependency on JetBrains Runtime in explicit version. |
For jetbrainsRuntime(version, variant, architecture), the default variant is jcef and the default architecture is detected from the current host. The version must use the [sdk]b[build] format, such as 21.0.3b446.1. Generated runtime versions use OS identifiers windows, osx, or linux, and normalized architecture identifiers such as x64 or aarch64. Kotlin allows the last two arguments to be omitted; Groovy requires all three arguments, with null selecting a default. A provider-based overload accepts providers for all three arguments.
jetbrainsRuntimeExplicit() accepts a String or Provider<String> containing the full artifact version, such as jbr_jcef-21.0.3-linux-x64-b446.1. jetbrainsRuntimeLocal() accepts a String, Path, or Directory, or a provider supplying a String, File, Path, or Directory.
See JetBrains Runtime (JBR) for more details.
Code Instrumentation
The code instrumentation process handled with the instrumentCode task requires extra dependencies to work and properly adjust the Java bytecode. The removed instrumentationTools() convenience helper is no longer necessary. You can still add and configure the dependencies separately if needed.
The javaCompiler() helper adds the Java Compiler dependency used for code instrumentation. By default, it uses the closest version selector.
The javaCompiler() helper is applied by default and refers to the tool version close to the currently used IntelliJ Platform.
Function | Description |
|---|---|
| Adds a dependency on Java Compiler. |
An explicit version accepts a String or Provider<String>.
Grammar and Parser Generation
Helpers for the GrammarKit plugin tasks.
Function | Description |
|---|---|
| Adds a Grammar Kit dependency used by |
| Adds a JFlex dependency used by |
Both helpers accept an explicit version as a String or Provider<String>. The no-argument forms use Constants.Constraints.GRAMMAR_KIT_VERSION and Constants.Constraints.JFLEX_VERSION, respectively, and are available in Kotlin. In Groovy, pass a version explicitly:
Compose UI
Function | Description |
|---|---|
| Adds the bundled modules required for working with Compose UI in the IntelliJ Platform. |
composeUI() is incubating and resolves bundled modules according to the target IDE build. The rows below are cumulative:
Target build | Added modules |
|---|---|
2024.3+ |
|
2025.1+ |
|
2025.3+ |
|
Dependency Exclusions
Function | Description |
|---|---|
| Excludes transitive Kotlin Standard Library artifacts from a dependency. |
| Excludes transitive Kotlin Coroutines artifacts from a dependency. |
These are top-level Kotlin extension functions on Gradle's ModuleDependency, not methods of dependencies.intellijPlatform. In Kotlin, import and call them inside a dependency configuration callback. In Groovy, import their generated static methods and pass the dependency explicitly:
excludeKotlinStdlib() covers org.jetbrains.kotlin:kotlin-stdlib and org.jetbrains.kotlin:kotlin-stdlib-jdk8. excludeCoroutines() covers kotlinx-coroutines-core, kotlinx-coroutines-core-jvm, kotlinx-coroutines-jdk8, kotlinx-coroutines-debug, kotlinx-coroutines-guava, kotlinx-coroutines-slf4j, and kotlinx-coroutines-test in the org.jetbrains.kotlinx, com.intellij.platform, and org.jetbrains.intellij.deps.kotlinx groups. These helpers exclude transitive Maven dependencies; use plugin library exclusions for JARs packaged inside another plugin.