IntelliJ Platform Gradle Plugin: introduce plugins extension for CustomIntelliJPlatformVersionAware

This commit is contained in:
Jakub Chrzanowski 2024-04-24 12:19:16 +02:00
parent 080ffb69ac
commit 91c32cd056
No known key found for this signature in database
GPG Key ID: C39095BFD769862E
2 changed files with 40 additions and 0 deletions

View File

@ -139,6 +139,35 @@ Type
: `DirectoryProperty`
### `plugins {}`
{#CustomIntelliJPlatformVersionAware-plugins}
An extension to provide custom plugins to be added when running the task enhanced with `CustomIntelliJPlatformVersionAware`.
It provides several methods for adding remote and local plugins, or for disabling already loaded or bundled plugin.
**Example:**
```kotlin
tasks {
val runIdeWithPlugins by registering(RunIdeTask::class) {
// ...
plugins {
plugin("pluginId", "1.0.0")
disablePlugin("pluginId")
}
}
}
```
| Function | Description |
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `plugin(id, version, channel)` | Adds a dependency on a plugin for a custom IntelliJ Platform. |
| `plugin(notation)` | Adds a dependency on a plugin for a custom IntelliJ Platform using a string notation:<p>`pluginId:version` or `pluginId:version@channel`</p> |
| `plugins(notations)` | Adds dependencies on plugins for a custom IntelliJ Platform using a string notation:<p>`pluginId:version` or `pluginId:version@channel`</p> |
| `disablePlugin(id)` | Disables the specific plugin with its ID. |
| `disablePlugins(ids)` | Disables specific plugins with the list of their IDs. |
## `IntelliJPlatformVersionAware`
{#IntelliJPlatformVersionAware}

View File

@ -813,6 +813,17 @@ Default value
: [`SandboxAware.sandboxPluginsDirectory`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware-sandboxPluginsDirectory)
### `disabledPlugins`
{#prepareSandbox-disabledPlugins}
An internal field to hold a list of plugins to be disabled within the current sandbox.
This property is controlled with [`disablePlugin()`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware-plugins) method of [](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware).
{style="narrow"}
Type
: `SetProperty<String>`
### `pluginJar`
{#prepareSandbox-pluginJar}