Migrating from Gradle IntelliJ Plugin (1.x)
Plugin Name Change
As the 2.x branch brings significant breaking changes to the plugin, the name was changed from Gradle IntelliJ Plugin to IntelliJ Platform Gradle Plugin as the old one was confused with the bundled Gradle support plugin in the IDE.
The plugin is published to the Gradle Plugin Portal with a new name as a new entry, and the old one is marked as deprecated.
Minimum Gradle and Java Versions
The minimum required Gradle version is now 9.0.0 running on Java 17 or later. The target IntelliJ Platform must be 2023.3 or later and may require a newer Java runtime than the JVM running Gradle. See Requirements.
Plugin ID Change
Plugin ID has changed from org.jetbrains.intellij to org.jetbrains.intellij.platform. To apply it, use:
Migration Plugin
Early 2.x releases introduced a dedicated migration plugin to ease the transition from Gradle IntelliJ Plugin 1.x.
After applying the Plugin ID Change, Gradle will fail to process the build.gradle.kts file as the old intellij {} Extension doesn't exist anymore.
intellij {} Extension
The intellij {} extension is no longer available and was replaced with intellijPlatform {}. Note that the available properties differ, see IntelliJ Platform Extension for details.
intellij.pluginName
Use: intellijPlatform.pluginConfiguration.name:
intellij.type, intellij.version
Define the IntelliJ Platform dependency in dependencies{} block:
intellij.plugins
The intellij.plugins property is no longer available.
Define dependencies on plugins or bundled plugins in dependencies {} block instead:
Example:
Setting up dependencies on comma-separated plugins listed in platformPlugins and platformBundledPlugins properties from gradle.properties.
See:
intellij.localPath
Define dependencies on local IDE instance in dependencies {} block:
intellij.updateSinceUntilBuild, intellij.sameSinceUntilBuild
The since/until properties in the plugin.xml file are now managed by the intellijPlatform extension.
intellij.intellijRepository, intellij.pluginsRepositories, intellij.jreRepository
Use the repositories {} block to manage repositories instead.
intellij.sandboxDir
Use the intellijPlatform.sandboxContainer.
intellij.downloadSources
Downloading and attaching sources is managed by the Plugin DevKit plugin. See Attaching Sources in the IDE and the downloadSources Gradle property.
intellij.ideaDependency
Access the ProductInfo object using the intellijPlatform.productInfo property.
Tasks
The verification task names changed meaning between 1.x and 2.x:
Gradle IntelliJ Plugin 1.x task | IntelliJ Platform Gradle Plugin 2.x task |
|---|---|
|
|
|
|
|
|
Running Tests
For JVM plugin tests, declare the required test framework dependencies. The Starter-based testUi task supplies its framework dependencies automatically.
downloadRobotServerPlugin
The Robot Server Plugin can now be downloaded using plugins { robotServerPlugin() } dependency helper when declaring a custom task.
runIdeForUiTests
The runIdeForUiTests task is obsolete and should be replaced with an explicit declaration.
The task running IDE with the Robot Server Plugin should be declared now as a custom runIde task with plugin loaded:
runPluginVerifier
The task for running the IntelliJ Plugin Verifier is now called verifyPlugin.
Use intellijPlatform.pluginVerification extension to configure it.
setupDependencies
To make the IntelliJ SDK dependency available in the IDE, the setupDependencies task was provided by Gradle IntelliJ Plugin 1.x. This task is no longer required, but when switching from 1.x, Gradle may still want to execute it in the afterSync phase.
To completely drop this approach, it is mandatory to remove its reference manually in the IDE.
Removing 'setupDependencies' Task
Open Gradle Tool Window
Right-click on the main module and select Tasks Activation
In the Tasks Activation modal window, find and remove the
setupDependenciesentry.
Alternatively, edit the .idea/workspace.xml file and remove the setupDependencies entry.
Other
Unresolved 'idea-ext' Plugin
Add an explicit dependency on the plugin in build.gradle.kts:
Upgrading Within 2.x
The current reference describes the latest released 2.x APIs. When upgrading an older 2.x build, check the following compatibility and configuration changes as well as the release notes.
Minimum Versions
The minimum supported versions changed at these releases:
Gradle plugin version | Minimum Gradle | Minimum target IntelliJ Platform |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The JVM running Gradle and the target IDE's required Java version are separate requirements. See JetBrains Runtime (JBR).
Dependency and Cache Configuration
Module Packaging
pluginModule(project(...)) packages a separate JAR under lib/modules/ in the plugin distribution. To merge a module into the main plugin JAR, use pluginComposedModule(project(...)) instead.
Project Cache Root
intellijPlatform.caching.path is read-only. Configure the project cache root through org.jetbrains.intellij.platform.intellijPlatformCache, not by assigning to caching.path.
Removed Dependency APIs
Deprecated positional useInstaller and productMode arguments were removed from dependency helpers. Set them in the configuration block instead:
Other deprecated APIs removed in 2.12.0 include:
Removed API | Replacement |
|---|---|
| Read-only |
Dependency configuration |
|
| Automatic compiler dependency; use |
|
|
|
|
| Discontinued target products; the dependency helpers are no longer available |
The org.jetbrains.intellij.platform.migration plugin and its legacy stub task classes, including RunPluginVerifierTask, were also removed in 2.12.0.
Changed Defaults
Upper Compatibility Bound
ideaVersion.untilBuild has no default. Explicitly configured values are still written to plugin.xml.
Minimum Compatible Build
sinceBuild defaults to the target IDE's major build number, such as 243, rather than a major/minor pair. Explicitly configured values are still written to plugin.xml.
Sandbox Container
The default sandbox container is .intellijPlatform/sandbox/, outside the build directory. Use cleanSandbox, not clean, to remove these persistent sandboxes.
Per-Project Sandbox Paths
Sandbox paths also contain the project name.
Toolchain and Verification
The Java toolchain language version follows the target platform unless overridden, and recommended verifier IDEs are selected when no explicit targets are configured. Signing and publishing credentials default to
CERTIFICATE_CHAIN,PRIVATE_KEY,PRIVATE_KEY_PASSWORD, andPUBLISH_TOKENenvironment variables.
Verifier Failure Levels
The default verifier failure levels also include internal and override-only API usages.
Product Release Metadata
Product release metadata uses JSON; custom Android Studio release mirrors must no longer serve XML. The productsReleasesJetBrainsIdesUrl property was removed in favor of productsReleasesCdnBuildsUrl.
Sandbox Runtime Dependencies
Kotlin Standard Library and coroutines dependencies are excluded from sandbox runtime classpaths by default. The Settings plugin also defaults kotlin.stdlib.default.dependency to false unless explicitly configured.
Task Configuration Changes
Split Mode
pluginInstallationTarget replaces splitModeTarget, which remains as a deprecated compatibility alias. The dedicated runIdeBackend and runIdeFrontend tasks can launch the two processes separately.
Distribution Archives and Setup
In
2.19.0,PublishPluginTask.archiveFilewas replaced witharchiveFilesto support multiple native distributions. Native variant archives are not signed automatically before publishing.The no-op
setupDependenciestask was removed in2.19.0; remove old IDE task-activation references as described above.
Plugin Verifier Runtime
Plugin Verifier uses each IDE's bundled runtime by default. Set pluginVerification.useBundledRuntime to false to use the build runtime instead. An explicit assignment to the verifyPlugin.useBundledRuntime task property takes precedence over the extension value.
UI Tests and Bundled-Plugin Classpaths
The preconfigured Starter UI task is named
testUiand uses src/testUi. The custom-task container remainsintellijPlatformTesting.testIdeUi.In
2.20.0,testIdeBundledPluginsClasspathEnabledwas removed; bundled plugins are always considered for test classpaths. UsetestIdeBundledPluginsClasspathExcludesfor optional exclusions. Required and explicitly declared plugin dependencies are retained.
Compiled Integrations
org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformTestingExtension.CommonParameters.getBuildDependencies() now returns the public Gradle org.gradle.api.tasks.TaskDependency. It previously returned the internal org.gradle.api.internal.tasks.DefaultTaskDependency. The former concrete-return JVM method signature was removed. Recompile convention plugins and other compiled integrations linked to that signature to avoid NoSuchMethodError. Migrate source code that uses DefaultTaskDependency-specific methods to public Gradle APIs. Ordinary build scripts that only use the testing DSL are not generally affected.