IntelliJ Platform Plugin SDK Help

IntelliJ Platform Gradle Plugin – FAQ

How to modify JVM arguments of the runIde task?

runIde task is a JavaExec task and can be modified according to the documentation.

To add some JVM arguments while launching the IDE, configure runIde task as follows:

tasks { runIde { jvmArgs("-DmyProperty=value") } }

How to modify system properties of the runIde task?

Using the very same task documentation, configure runIde task:

tasks { runIde { systemProperty("name", "value") } }

How to disable automatic reload of dynamic plugins?

See Enabling Auto-Reload for important caveats.

You can disable auto-reload globally with intellijPlatform.autoReload:

intellijPlatform { autoReload = false }

It is also possible to disable it for a specific runIde-based task as follows:

tasks { runIde { autoReload = false } }

How to disable building searchable options?

Building searchable options can be disabled using intellijPlatform.buildSearchableOptions:

intellijPlatform { buildSearchableOptions = false }

As a result of disabling building searchable options, the Settings that your plugin provides won't be searchable in the Settings dialog. Disabling of the task is suggested for plugins that are not intended to provide custom settings.

How to show the log file of a sandbox instance?

The most convenient way to see the logs of a running IDE is to add a tab to the Run tool window displaying the contents of idea.log file. In the Gradle runIde run configuration, add the log file path according to sandbox location as described in View logs.

Task setupDependencies not found in root project 'projectName'

This exception is thrown when there's no setupDependencies task present in the project scope.

See Migrating from Gradle IntelliJ Plugin for more details.

How to expose my plugin API sources to dependent plugins?

See the Bundling Plugin API Sources section for details.

JaCoCo reports 0% coverage

The Gradle IntelliJ Plugin, when targeting the IntelliJ SDK 2022.1+, uses the PathClassLoader class loader by the following system property:


Because of that, JaCoCo – and other external tools that rely on classes available in the bootstrap class loader – fail to discover plugin classes.

In addition, if the code instrumentation is enabled (see intellij.instrumentCode), it's required to switch to the compiled and instrumented output instead of default compiled classes.

The following changes to your Gradle configuration file:

tasks { withType<Test> { configure<JacocoTaskExtension> { isIncludeNoLocationClasses = true excludes = listOf("jdk.internal.*") } } jacocoTestReport { classDirectories.setFrom(instrumentCode) } jacocoTestCoverageVerification { classDirectories.setFrom(instrumentCode) } }
test { jacoco { includeNoLocationClasses = true excludes = ["jdk.internal.*"] } } jacocoTestReport { classDirectories.setFrom(instrumentCode) } jacocoTestCoverageVerification { classDirectories.setFrom(instrumentCode) }

Kotlin compiler throws Out of memory. Java heap space error

Please upgrade to Kotlin 1.9.0. See the Incremental compilation section if using Kotlin 1.8.20.

How to check the latest available EAP release?

To list the IntelliJ Platform releases matching your criteria (IntelliJ Platform type, release channels, or build range), you may use the printProductsReleases task, as follows:

tasks { printProductsReleases { channels = listOf(ProductRelease.Channel.EAP) types = listOf(IntelliJPlatformType.IntellijIdeaCommunity) untilBuild = provider { null } doLast { val latestEap = productsReleases.get().max() } } }

The currently selected Java Runtime is not JetBrains Runtime (JBR)

When running tests or IDE with your plugin loaded, it is necessary to use JetBrains Runtime (JBR). In the case, no JBR is found in the plugin configuration, there's the following warning logged by the verifyPluginProjectConfiguration task:

The currently selected Java Runtime is not JetBrains Runtime (JBR). This may lead to unexpected IDE behaviors. Please use IntelliJ Platform binary release with bundled JBR or define it explicitly with project dependencies or JVM Toolchain.

To correctly run your tests or a specific IDE:

  • use a binary IDE distribution with bundled JetBrains Runtime, i.e., by referring to a local IDE local(localPath)

    repositories { mavenCentral() intellijPlatform { defaultRepositories() } } dependencies { intellijPlatform { local("/Users/hsz/Applications/IntelliJ IDEA") } }
  • add an explicit dependency on a JetBrains Runtime with jetbrainsRuntime()

    repositories { mavenCentral() intellijPlatform { defaultRepositories() jetbrainsRuntime() } } dependencies { intellijPlatform { intellijIdeaCommunity("2024.1.2") jetbrainsRuntime(...) } }
  • specify the vendor when configuring the JVM Toolchain along with Foojay Toolchains Plugin:

    kotlin { jvmToolchain { languageVersion = JavaLanguageVersion.of(17) vendor = JvmVendorSpec.JETBRAINS } }
Last modified: 09 May 2024