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 8.2 running on Java 17 or later. See Requirements.
Plugin ID Change
Plugin ID has changed from org.jetbrains.intellij
to org.jetbrains.intellij.platform
. To apply it, use:
Migration Plugin
The 2.x release introduces multiple Plugins, featuring a dedicated one to help with migration from Gradle IntelliJ Plugin 1.x: Migration.
When you apply the Plugin ID Change, Gradle will fail to process the build.gradle.kts file as the old
intellij {} Extension
doesn't exist anymore. To fill all gaps and help users figure out required changes - right in the IDE - the org.jetbrains.intellij.platform.migration
plugin was introduced:
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
intellij.sandboxDir
Use the intellijPlatform.sandboxContainer
.
Use the repositories {}
block to manage repositories instead.
intellij.downloadSources
Downloading sources is managed by the Plugin DevKit plugin in version 2024.1+.
intellij.ideaDependency
Access the ProductInfo
object using the intellijPlatform.productInfo
property.
Tasks
Running Tests
An explicit dependency on a test framework is now required.
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
setupDependencies
entry.
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: