IntelliJ Platform Plugin SDK Help

IntelliJ Platform Extension

The IntelliJ Platform Gradle Plugin introduces a top-level intellijPlatform extension. It consists of sections dedicated to the general Gradle plugin configuration, plugin.xml definition, publishing, signing, and verifying of the output plugin for IntelliJ-based IDEs.

IntelliJ Platform

After the IntelliJ Platform Gradle Plugin is applied, the intellijPlatform extension can be used to configure the plugin and common settings of the provided tasks.

Example:

intellijPlatform { buildSearchableOptions = true instrumentCode = true projectName = project.name sandboxContainer = "..." pluginConfiguration { // ... } publishing { // ... } signing { // ... } verifyPlugin { // ... } }

cachePath

Provides read-only access to the IntelliJ Platform project cache location.

The IntelliJ Platform cache is used for storing IntelliJ Platform Gradle Plugin-specific files, such as:

This path can be changed with the org.jetbrains.intellij.platform.intellijPlatformCache Gradle property

Access

Read-only

Type

Path

Default value

[rootProject]/.intellijPlatform/

platformPath

Provides read-only access to the IntelliJ Platform dependency artifact path.

Access

Read-only

Type

Path

Default value

Path of the current IntelliJ Platform

productInfo

Provides read-only access to the ProductInfo object associated with the IntelliJ Platform dependency configured for the current project.

Access

Read-only

Type

ProductInfo

Default value

ProductInfo of the current IntelliJ Platform

autoReload

Enables auto-reload of dynamic plugins. Dynamic plugin will be reloaded automatically when its content is modified.

This allows a much faster development cycle by avoiding a full restart of the development instance after code changes.

Type

Property<Boolean>

Default value

true

See also:

buildSearchableOptions

Builds an index of UI components (searchable options) for the plugin. Controls the execution of the buildSearchableOptions task.

Type

Property<Boolean>

Default value

true

See also:

instrumentCode

Enables the instrumentCode of the compiled classes.

Controls the execution of the instrumentCode task.

Type

Property<Boolean>

Default value

true

projectName

Defines the project name, which is used for creating file structure and the build archive.

Type

Property<String>

Default value

project.name

sandboxContainer

The path to the sandbox container where tests and IDE instances read and write data.

Type

DirectoryProperty

Default value

[buildDirectory]/idea-sandbox

See also:

splitMode

Allows for checking how a plugin works in remote development mode, when one machine is running the backend part and another is running a frontend part (JetBrains Client) which connects to the backend.

This property allows running the IDE with backend and frontend parts running in separate processes. The developed plugin is installed in the backend part.

Type

Property<Boolean>

Default value

true

See also:

splitModeTarget

Specifies in which part of the product the developed plugin should be installed.

Type

Property<SplitModeTarget>

Default value

SplitModeTarget.BACKEND

See also:

Plugin Configuration

Configures the plugin definition and stores values in the plugin.xml file. Data provided to the intellijPlatform.pluginConfiguration {} extension is passed to the patchPluginXml task, which augments the plugin.xml file with new values.

Requires the Build plugin to be applied.

Example:

intellijPlatform { // ... pluginConfiguration { id = "my-plugin-id" name = "My Awesome Plugin" version = "1.0.0" description = "It's an awesome plugin!" changeNotes = """ A descriptive release note... """.trimIndent() productDescriptor { // ... } ideaVersion { // ... } vendor { // ... } } }

See also:

id

The plugin's unique identifier. This should mirror the structure of fully qualified Java packages and must remain distinct from the IDs of existing plugins. This ID is a technical descriptor used not only within the IDE, but also on JetBrains Marketplace.

Please restrict input to characters, numbers, and ./-/_ symbols, and aim for a concise length.

The provided value will populate the <id> element.

Type

Property<String>

See also:

name

The plugin's display name, visible to users. It should use Title Case.

The provided value is used to populate the <name> element.

Type

Property<String>

See also:

version

The plugin version, presented in the Plugins settings dialog and on its JetBrains Marketplace page.

For plugins uploaded to the JetBrains Marketplace, semantic versioning must be adhered to.

The provided value is used as a <version> element.

Type

Property<String>

See also:

description

The plugin description, which is presented on the JetBrains Marketplace plugin page and in the Plugins settings dialog. Basic HTML elements such as text formatting, paragraphs, and lists are permitted.

The description content is automatically enclosed in <![CDATA[... ]]>.

The provided value is used to populate the <description> element.

Type

Property<String>

See also:

changeNotes

A concise summary of new features, bug fixes, and alterations provided in the latest plugin version. These change notes will be displayed on the JetBrains Marketplace plugin page and in the Plugins settings dialog. Basic HTML elements such as text formatting, paragraphs, and lists are permitted.

The change notes content is automatically enclosed in <![CDATA[... ]]>.

The provided value is used to populate the <change-notes> element.

Type

Property<String>

See also:

Product Descriptor

A part of the Plugin Configuration which describes the product-descriptor element.

Example:

intellijPlatform { // ... pluginConfiguration { // ... productDescriptor { code = "MY_CODE" releaseDate = "20240217" releaseVersion = "20241" optional = false } } }

See also:

code

The product code for the plugin, used in the JetBrains Sales System. The value must be pre-approved by JetBrains and must adhere to specified requirements.

The provided value is used for a <product-descriptor code=""> element attribute.

Type

Property<String>

See also:

releaseDate

The release date of the major version, formatted as YYYYMMDD.

The provided value is used for the <product-descriptor release-date=""> element attribute.

Type

Property<String>

See also:

releaseVersion

The major version, represented in a specific numerical format.

The provided value is used for the <product-descriptor release-version=""> element attribute.

Type

Property<String>

See also:

optional

The boolean value that indicates if the plugin is a Freemium plugin.

The provided value is used for the <product-descriptor optional=""> element attribute.

Type

Property<Boolean>

Default value

false

See also:

Idea Version

A part of the Plugin Configuration which describes the <idea-version> element.

Example:

intellijPlatform { // ... pluginConfiguration { // ... ideaVersion { sinceBuild = "241" untilBuild = "241.*" } } }

See also:

sinceBuild

The earliest IDE version that is compatible with the plugin.

The provided value is used for the <idea-version since-build=""/> element attribute.

The default value is set to the MAJOR.MINOR version based on the currently selected IntelliJ Platform, like 233.12345.

Type

Property<String>

Default value

MAJOR.MINOR

See also:

untilBuild

The latest IDE version that is compatible with the plugin. An undefined value signifies compatibility with all IDEs starting from the version mentioned in since-build, including potential future builds that may cause compatibility issues.

The provided value is used for the <idea-version until-build=""/> element attribute.

The default value is set to the MAJOR.* version based on the currently selected IntelliJ Platform, such as 233.*.

The until-build attribute can be unset by setting provider { null } as a value. Note that passing only null will make Gradle use a default value instead.

Type

Property<String>

Default value

MAJOR.*

See also:

Vendor

A part of the Plugin Configuration which describes the <vendor> element.

Example:

intellijPlatform { // ... pluginConfiguration { // ... vendor { name = "JetBrains" email = "hello@jetbrains.com" url = "https://www.jetbrains.com" } } }

name

The name of the vendor or the organization ID (if created), as displayed in the Plugins settings dialog and on the JetBrains Marketplace plugin page.

The provided value is used as the value of the <vendor> element.

Type

Property<String>

See also:

email

The email address of the vendor.

The provided value is used for the <vendor email=""> element attribute.

Type

Property<String>

See also:

url

The URL to the vendor's homepage.

The provided value is used for the <vendor url=""> element attribute.

Type

Property<String>

See also:

Publishing

Configures the publishing process of the plugin. All values are passed to the publishPlugin task.

Requires the Publish plugin to be applied.

Example:

intellijPlatform { // ... publishing { host = "" token = "7hR4nD0mT0k3n_8f2eG" channels = listOf("default") ideServices = false hidden = false } }

host

The hostname used for publishing the plugin.

Type

Property<String>

Default value

https://plugins.jetbrains.com

See also:

token

Authorization token.

Type

Property<String>

Required

yes

See also:

channels

A list of channel names to upload plugin to.

Type

ListProperty<String>

Default value:

listOf("default")

See also:

ideServices

Specify if the IDE Services plugin repository service should be used.

Type

Property<String>

Default value

false

See also:

hidden

Publish the plugin update and mark it as hidden to prevent public visibility after approval.

Type

Property<String>

Default value

false

See also:

Signing

Plugin signing configuration.

Requires the Publish plugin to be applied.

Example:

intellijPlatform { // ... signing { cliPath = file("/path/to/marketplace-zip-signer-cli.jar") keyStore = file("/path/to/keyStore.ks") keyStorePassword = "..." keyStoreKeyAlias = "..." keyStoreType = "..." keyStoreProviderName = "..." privateKey = "..." privateKeyFile = file("/path/to/private.pem") password = "..." certificateChain = "..." certificateChainFile = file("/path/to/chain.crt") } }

See also:

cliPath

A path to the local Marketplace ZIP Signer CLI tool to be used.

Type

RegularFileProperty

See also:

keyStore

KeyStore file path. Refers to ks CLI option.

Type

Property<String>

See also:

keyStorePassword

KeyStore password. Refers to ks-pass CLI option.

Type

Property<String>

See also:

keyStoreKeyAlias

KeyStore key alias. Refers to ks-key-alias CLI option.

Type

Property<String>

See also:

keyStoreType

KeyStore type. Refers to ks-type CLI option.

Type

Property<String>

See also:

keyStoreProviderName

JCA KeyStore Provider name. Refers to ks-provider-name CLI option.

Type

Property<String>

See also:

privateKey

Encoded private key in the PEM format. Refers to key CLI option.

Takes precedence over the privateKeyFile property.

Type

Property<String>

See also:

privateKeyFile

A file with an encoded private key in the PEM format. Refers to key-file CLI option.

Type

RegularFileProperty

See also:

password

Password required to decrypt the private key. Refers to key-pass CLI option.

Type

Property<String>

See also:

certificateChain

A string containing X509 certificates. The first certificate from the chain will be used as a certificate authority (CA). Refers to cert CLI option.

Takes precedence over the certificateChainFile property.

Type

Property<String>

See also:

certificateChainFile

Path to the file containing X509 certificates. The first certificate from the chain will be used as a certificate authority (CA). Refers to cert-file CLI option.

Type

RegularFileProperty

See also:

Verify Plugin

IntelliJ Plugin Verifier CLI tool configuration.

Requires the Verify plugin to be applied.

Example:

intellijPlatform { // ... verifyPlugin { cliPath = file("/path/to/plugin-verifier-cli.jar") freeArgs = listOf("foo", "bar") homeDirectory = file("/path/to/pluginVerifierHomeDirectory/") downloadDirectory = file("/path/to/pluginVerifierHomeDirectory/ides/") failureLevel = VerifyPluginTask.FailureLevel.ALL verificationReportsDirectory = "build/reports/pluginVerifier" verificationReportsFormats = VerifyPluginTask.VerificationReportsFormats.ALL externalPrefixes = "com.example" teamCityOutputFormat = false subsystemsToCheck = VerifyPluginTask.Subsystems.ALL ignoredProblemsFile = file("/path/to/ignoredProblems.txt") ides { // ... } } }

See also:

cliPath

A path to the local IntelliJ Plugin Verifier CLI tool to be used.

Type

RegularFileProperty

See also:

downloadDirectory

The path to the directory where IDEs used for the verification will be downloaded.

Type

DirectoryProperty

Default value

homeDirectory/ides

failureLevel

Defines the verification level at which the task should fail if any reported issue matches.

Type

ListProperty<FailureLevel>

Default value

FailureLevel.COMPATIBILITY_PROBLEMS

See also:

externalPrefixes

The list of class prefixes from the external libraries. The Plugin Verifier will not report No such class for classes of these packages.

Type

ListProperty<String>

See also:

freeArgs

The list of free arguments is passed directly to the IntelliJ Plugin Verifier CLI tool.

They can be used in addition to the arguments that are provided by dedicated options.

Type

ListProperty<String>

See also:

homeDirectory

Retrieve the Plugin Verifier home directory used for storing downloaded IDEs. Following home directory resolving method is taken directly from the Plugin Verifier to keep the compatibility.

Type

DirectoryProperty

Default value
  • Directory specified with plugin.verifier.home.dir system property

  • Directory specified with XDG_CACHE_HOME environment variable

  • ~/.cache/pluginVerifier

  • [buildDirectory]/tmp/pluginVerifier

ignoredProblemsFile

A file that contains a list of problems that will be ignored in a report.

Type

RegularFileProperty

See also:

subsystemsToCheck

Which subsystems of the IDE should be checked.

Type

Subsystems

Default value

Subsystems.ALL

See also:

teamCityOutputFormat

A flag that controls the output format. If set to true, the TeamCity compatible output will be returned to stdout.

Type

Property<Boolean>

Default value

false

See also:

verificationReportsDirectory

The path to the directory where verification reports will be saved.

Type

DirectoryProperty

Default value

[buildDirectory]/reports/pluginVerifier

See also:

verificationReportsFormats

The output formats of the verification reports.

Type

ListProperty<VerificationReportsFormats>

Default value

VerificationReportsFormats.PLAIN, FailureVerificationReportsFormats

See also:

Verify Plugin IDEs

The extension to define the IDEs to be used along with the IntelliJ Plugin Verifier CLI tool for the binary plugin verification.

It provides a set of helpers which add relevant entries to the configuration, which later is used to resolve IntelliJ-based IDE binary releases.

Example:

import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType intellijPlatform { // ... verifyPlugin { // ... ides { ide(IntelliJPlatformType.PhpStorm) ide(IntelliJPlatformType.RustRover, "2023.3") local(file("/path/to/ide/")) recommended() select { types = listOf(IntelliJPlatformType.PhpStorm) channels = listOf(ProductRelease.Channel.RELEASE) sinceBuild = "232" untilBuild = "241.*" } } } }

See also:

Function

Description

ide(type, version)

ide(definition)

Adds a dependency to a binary IDE release to be used for testing with the IntelliJ Plugin Verifier.

local(localPath)

Adds the local IDE to be used for testing with the IntelliJ Plugin Verifier.

recommended()

Retrieves matching IDEs using the default configuration based on the currently used IntelliJ Platform and applies them for IntelliJ Platform Verifier using the ide helper method.

select(configure)

Retrieves matching IDEs using custom ProductReleasesValueSource.FilterParameters filter parameters.

Last modified: 13 May 2024