intellij-sdk-code-samples/topics/appendix/tools/tools_gradle_intellij_plugin_faq.md
2022-06-02 22:30:33 +02:00

2.7 KiB

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:

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

How to modify system properties of runIde task

Using the very same task documentation, configure runIde task:

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

How to disable automatic reload of dynamic plugins

Configure runIde task as follows:

tasks {
    runIde {
        autoReloadPlugins.set(false)
    }
}
runIde {
    autoReloadPlugins = false
}

How to disable building searchable options

Building searchable options can be disabled as a task:

tasks {
    buildSearchableOptions {
        enabled = false
    }
}
buildSearchableOptions.enabled = false

As a result of disabling building searchable options, the configurables that your plugin provides won't be searchable in the Settings dialog.

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:

tasks {
    prepareSandbox {
        from("yourFile") {
            into("${intellij.pluginName.get()}/lib/")
        }
    }
}
prepareSandbox {
    from("yourFile") {
        into "${intellij.pluginName.get()}/lib/"
    }
}