mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
tools_intellij_platform_gradle_plugin_recipes.md: added 'Run the IDE with a default argument provided'
This commit is contained in:
parent
6c022469ff
commit
5d06cc63ea
@ -269,3 +269,36 @@ prepareSandbox {
|
||||
|
||||
</tab>
|
||||
</tabs>
|
||||
|
||||
|
||||
## 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:
|
||||
|
||||
<tabs group="languages">
|
||||
<tab title="Kotlin" group-key="kotlin">
|
||||
|
||||
```kotlin
|
||||
tasks {
|
||||
runIde {
|
||||
argumentProviders.add(CommandLineArgumentProvider {
|
||||
listOf("/path/to/the/project")
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</tab>
|
||||
<tab title="Groovy" group-key="groovy">
|
||||
|
||||
```groovy
|
||||
runIde {
|
||||
argumentProviders.add {
|
||||
['/path/to/the/project']
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</tab>
|
||||
</tabs>
|
||||
|
Loading…
x
Reference in New Issue
Block a user