diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_recipes.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_recipes.md index 90c0e974b..ef8930d8d 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_recipes.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_recipes.md @@ -269,3 +269,36 @@ prepareSandbox { + + +## Run the IDE with a default argument provided + +When running the IDE from the command line, you can pass an argument, like a path to the project or file, to open it automatically. +This is also possible when using the [`runIde`](tools_intellij_platform_gradle_plugin_tasks.md#runIde) task: + + + + +```kotlin +tasks { + runIde { + argumentProviders.add(CommandLineArgumentProvider { + listOf("/path/to/the/project") + }) + } +} +``` + + + + +```groovy +runIde { + argumentProviders.add { + ['/path/to/the/project'] + } +} +``` + + +