IntelliJ Platform Plugin SDK Help

Plugins

The IntelliJ Platform Gradle Plugin consists of multiple subplugins which can be applied in bundles (Platform or Module) or separately.

Subplugins architecture allows applying a subset of features, e.g., to provide the IntelliJ Platform dependency to a project submodule without creating unnecessary tasks.

The following chart describes dependencies between plugins provided with the IntelliJ Platform Gradle Plugin.

The plugins highlighted in bold are recommended for most of the cases when creating a plugin for IntelliJ-based IDEs.

Settings
Platform
Module
Migration
Base
Build
Test
Verify
Run
Publish

Platform

Plugin ID: org.jetbrains.intellij.platform

This is a top-level plugin that applies all project-level subplugins that bring the fully flagged tooling for plugin development for IntelliJ-based IDEs.

This plugin should be used in most cases when working with a single-module project:

build.gradle.kts

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

Included plugins:

Module

Plugin ID: org.jetbrains.intellij.platform.module

This top-level plugin applies a smaller set of subplugins required for providing required dependencies and build/test tasks for a submodule when working on a plugin for IntelliJ-based IDEs in a multi-module architecture.

Comparing to the main plugin, it doesn't contain tasks related to publishing or running the IDE for testing purposes.

settings.gradle.kts

rootProject.name = "..." include(":submodule")

build.gradle.kts

plugins { id("org.jetbrains.intellij.platform") version "2.0.0-beta3" } repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { implementation(project(":submodule")) intellijPlatform { intellijIdeaCommunity("2024.1.2") } }

submodule/build.gradle.kts

plugins { id("org.jetbrains.intellij.platform.module") } repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { intellijPlatform { intellijIdeaCommunity("2024.1.2") } }

Included plugins:

Settings

Plugin ID: org.jetbrains.intellij.platform.settings

If repositories are defined within the settings.gradle.kts using the dependencyResolutionManagement Gradle, make sure to include the Settings plugin in settings.gradle.kts.

See Dependency Resolution Management for more details.

settings.gradle.kts

import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform plugins { id("org.jetbrains.intellij.platform.settings") version "2.0.0-beta3" } rootProject.name = "..." dependencyResolutionManagement { repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS repositories { mavenCentral() intellijPlatform { defaultRepositories() } } } include(":submodule")

build.gradle.kts

plugins { id("org.jetbrains.intellij.platform") version "2.0.0-beta3" } dependencies { implementation(project(":submodule")) intellijPlatform { intellijIdeaCommunity("2024.1.2") } }

submodule/build.gradle.kts

plugins { id("org.jetbrains.intellij.platform.module") } dependencies { intellijPlatform { intellijIdeaCommunity("2024.1.2") } }

Migration

Plugin ID: org.jetbrains.intellij.platform.migration

The Migration plugin is designed to assist in upgrading projects using Gradle IntelliJ Plugin 1.x. To prevent Gradle failing due to breaking changes, the org.jetbrains.intellij.platform.migration plugin was introduced to fill missing gaps and provide migration hints.

It loads the Platform plugin with additional mocks and checks applied — after the successful migration, it is recommended to replace the org.jetbrains.intellij.platform.migration identifier with org.jetbrains.intellij.platform.

See Migrating from Gradle IntelliJ Plugin for more details.

Base

Plugin ID: org.jetbrains.intellij.platform.base

Sets up all the custom configurations and transformers needed to manage the IntelliJ Platform dependency, JetBrains Runtime, CLI tools, and other plugins when they're added as dependencies.

It also introduces the IntelliJ Platform Extension to the build.gradle.kts file along with Dependencies Extension and Repositories Extension to help preconfiguring project dependencies:

repositories { ... intellijPlatform { // Repositories Extension } } dependencies { ... intellijPlatform { // Dependencies Extension } } intellijPlatform { // IntelliJ Platform Extension }

Plugin also introduces a task listener which allows for creating custom tasks decorated with Task Awares.

Included tasks:

Build

Plugin ID: org.jetbrains.intellij.platform.build

Registers and preconfigures tasks responsible for patching, instrumenting, and building the plugin.

Included tasks:

Publish

Plugin ID: org.jetbrains.intellij.platform.publish

Adds tasks responsible for signing and publishing the final plugin archive to JetBrains Marketplace.

Included tasks:

Run

Plugin ID: org.jetbrains.intellij.platform.run

Registers the task used for running the local instance of the IntelliJ Platform used for development.

It allows introducing custom tasks, so it is possible to run a plugin against various IDEs during the development process.

Included tasks:

Test

Plugin ID: org.jetbrains.intellij.platform.test

Preconfigures the existing test task to make the plugin testing possible (unit tests, UI tests, performance tests). In addition, it preconfigures the customizable TestIdeTask class, so it is possible to register multiple test* tasks for running tests against different IDEs.

Included tasks:

Verify

Plugin ID: org.jetbrains.intellij.platform.verify

Introduces various verification tasks that run checks against project configuration, plugin.xml file, signature check, or execute the IntelliJ Plugin Verifier tool.

Included tasks:

Last modified: 10 May 2024