IntelliJ Platform Plugin SDK Help

Migrating from Gradle IntelliJ Plugin

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:

plugins { id("org.jetbrains.intellij.platform") version "2.0.0-beta3" }

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:

plugins { id("org.jetbrains.intellij.platform") version "2.0.0-beta3" id("org.jetbrains.intellij.platform.migration") version "2.0.0-beta3" }

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:

intellijPlatform { pluginConfiguration { name = ... } }

intellij.type, intellij.version

Define the IntelliJ Platform dependency in dependencies{} block:

repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { intellijPlatform { create(type, version) } }

See: Dependencies Extension

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.

repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { intellijPlatform { plugins(providers.gradleProperty("platformPlugins").map { it.split(',') }) bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') }) } }

See: Plugins

intellij.localPath

Define dependencies on local IDE instance in dependencies {} block:

repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { intellijPlatform { local(localPath) } }

See: Custom Target Platforms

intellij.updateSinceUntilBuild, intellij.sameSinceUntilBuild

The plugin.xml file is now fully 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.

See: Repositories Extension

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

downloadRobotServerPlugin

The Robot Server Plugin integration is not yet available. See testIdeUi.

runIdeForUiTests

Use testIdeUi.

runPluginVerifier

The task for running the IntelliJ Plugin Verifier is now called verifyPlugin.

Use intellijPlatform.verifyPlugin 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

  1. Open Gradle Tool Window

  2. Right-click on the main module and select Tasks Activation

  3. 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:

    plugins { id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.8" }
    Last modified: 14 May 2024