Gradle IntelliJ Plugin – FAQ
How to target 2022.3 platform
How to modify JVM arguments of runIde task
To add some JVM arguments while launching the IDE, configure
runIde task as follows:
How to modify system properties of runIde task
How to disable automatic reload of dynamic plugins
See Enabling Auto-Reload for important caveats.
runIde task as follows:
How to disable building searchable options
Building searchable options can be disabled as a task:
As a result of disabling building searchable options, the Settings that your plugin provides won't be searchable in the dialog. Disabling of the task is suggested for plugins that are not intended to provide custom settings.
How to show log file of sandbox instance
The most convenient way to see the logs of 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.
How to add a custom file inside plugin distribution
Task 'setupDependencies' not found in root project
setupDependencies task is designed to fetch the target IDE dependency from the IntelliJ Repository in the after-sync Gradle phase, but only when working inside IntelliJ IDEA – to make the IntelliJ SDK classes resolved and code completion available. To achieve that, the
gradle-idea-ext-plugin is used, which alters the IDEA project's .idea/workspace.xml file making the
setupDependencies task activated on
Unfortunately, this entry remains even after disabling the
org.jetbrains.intellij plugin in a project – the
setupDependencies task won't be resolved appropriately, which produces the following exception:
To fix that, manually edit the .idea/workspace.xml file removing mentioned entry, go to the Gradle tool window, select the action from the context menu of the root project item, and remove it.
How to expose my plugin API sources to dependent plugins
See the Bundling Plugin API Sources section for details.
The Plugin Verifier download directory is set to ..., but downloaded IDEs were also found in ...
1.10.0 release, the
runPluginVerifier task uses the
XDG_CACHE_HOME environment variable (see XDG Base Directory for more details) to resolve the default directory for downloaded IDEs – instead of the user's home directory. We recommend moving your existing IDEs stored i.e., in ~/.pluginVerifier/ides/ directory into $XDG_CACHE_HOME/pluginVerifier/ides to avoid downloading them once again.
In case you want to keep the downloaded archives in the previous location, specify the given path explicitly to the
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 a default compiled classes.
The following changes to your Gradle configuration file:
Exception javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
When using Java
11.0.2 for building plugins, resolving dependencies (or making any other network requests) in Gradle IntelliJ Plugin fails due to the JDK-8220723 issue with the following exception:
To fix that issue, upgrade the Java version to the latest patch available of the major version of your choice.
How to add a dependency on a plugin available in the file system
It is possible to add a dependency on a plugin available in the file system — like a plugin update downloaded manually from JetBrains Marketplace or built separately in another project.
To configure the dependency, add the
File instance to the
intellij.plugins property and point it to the extracted plugin's directory which contains the lib directory.
It is also possible to refer to the sandbox directory of another Gradle project — to do that, point to the /projects/plugin-name/build/idea-sandbox/plugins/plugin-name/ directory.
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.