Gradle IntelliJ Plugin – FAQ
Frequently Asked Questions
How to modify JVM arguments of runIde task
runIde
task is a Java Exec task and can be modified according to the documentation.
To add some JVM arguments while launching the IDE, configure runIde
task as follows:
How to modify system properties of runIde task
Using the very same task documentation, configure runIde
task:
How to disable automatic reload of dynamic plugins
See Enabling Auto-Reload for important caveats.
Configure 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 do I add my a custom file inside plugin distribution
prepareSandbox
task is a Sync
task and can be modified accordingly. Something like following should work:
Task 'setupDependencies' not found in root project
The 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 after_sync
event.
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 do I expose my plugin API sources to dependent plugins?
See the Bundling Plugin API Sources section for details.