From 688e3093c72531da264a27a61cf562ca5933101f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Thu, 25 Jan 2024 17:43:55 +0100 Subject: [PATCH 01/54] tools_intellij_platform_gradle_plugin.md: initial --- .../tools_intellij_platform_gradle_plugin.md | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 topics/tools_intellij_platform_gradle_plugin.md diff --git a/topics/tools_intellij_platform_gradle_plugin.md b/topics/tools_intellij_platform_gradle_plugin.md new file mode 100644 index 000000000..2f8cc3dd5 --- /dev/null +++ b/topics/tools_intellij_platform_gradle_plugin.md @@ -0,0 +1,180 @@ + + +# IntelliJ Platform Gradle Plugin 2.x (EA) + +IntelliJ Platform Gradle Plugin user and migration guide. + + + +**Current Release**: Early Access + +**GitHub**: [Releases & Changelog](https://github.com/JetBrains/gradle-intellij-plugin/releases), [Issue Tracker](https://github.com/JetBrains/gradle-intellij-plugin/issues) + +**Slack**: [#intellij-platform-gradle-plugin](https://jetbrains-platform.slack.com/archives/C05C80200LS) on the [JetBrains Platform Slack](https://plugins.jetbrains.com/slack/) + + + +The _IntelliJ Platform Gradle Plugin 2.x_ is a plugin for the Gradle build system to help configure your environment for +building, testing, verifying, and publishing plugins for IntelliJ-based IDEs. + +It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ in the future. + +> This plugin is currently in **Early Access** and may not support all features and project setups yet (see also [](#requirements)). +> Please report bugs or problems in the above-linked issue tracker or Slack channel. +> +> Any documentation issues on this page should be reported using the feedback form on the bottom of this page. +> +> Thanks a lot in advance for your feedback! +> +{title="Early Access Status" style="warning"} + +## Requirements + +The following platforms and environments are supported: + +- IntelliJ Platform: 2022.3 and later +- Java Runtime: 17 and later +- Gradle: 8.0 and later + +## Usage + +To use the current Early Access snapshot versions, add to your settings.gradle.kts file: + +```kotlin +pluginManagement { + repositories { + maven("https://oss.sonatype.org/content/repositories/snapshots/") + gradlePluginPortal() + } +} +``` + +In the build.gradle.kts file, replace the existing reference to the [](tools_gradle_intellij_plugin.md) plugin (`org.jetbrains.intellij`) with: + +```kotlin +plugins { + id("org.jetbrains.intellij.platform") version "2.0.0-SNAPSHOT" +} +``` + +### Available Subplugins + +The plugin has a new ID: `org.jetbrains.intellij.platform`, but also was split into subplugins. +This approach allows you to choose between applying all configurations and tasks at once, or applying them separately, e.g., +to only use an IntelliJ SDK dependency without creating any tasks. + +#### org.jetbrains.intellij.platform + +{id="plugin.platform"} + +This plugin applies all project-level plugins, which brings the fully-flagged tooling for plugin development for IntelliJ-based IDEs. + +It includes [](#plugin.base) and [](#plugin.tasks) subplugins. + +#### org.jetbrains.intellij.platform.base + +{id="plugin.base"} + +Base plugin registers all necessary custom configurations and dependencies transformers used for handling IntelliJ SDK, +JetBrains Runtime, or other plugins when used as dependencies. + +#### org.jetbrains.intellij.platform.tasks + +{id="plugin.tasks"} + +Tasks plugin registers and preconfigures all tasks introduced by the IntelliJ Platform Gradle Plugin. +It can be omitted when referring to any IntelliJ SDK dependencies without invoking tasks on project submodules. + +#### org.jetbrains.intellij.platform.settings + +{id="plugin.settings"} + +Settings plugin is required in settings.gradle.kts when using `RepositoryHandler` extensions when declaring the +IntelliJ Maven repository (see [](intellij_artifacts.md)) for the `dependencyResolutionManagement` Gradle mechanism. + +## Configuration + +> Auto-completion, Quick Documentation, and other code insight features are available for many extension functions and properties. +> +{title="Exploring Configuration Options"} + +### Setting up IntelliJ Repositories + +{id="intellij.repositories"} + +All IntelliJ SDK artifacts are available via IntelliJ Maven repositories (see [](intellij_artifacts.md)), which exist in three variants: + +- releases +- snapshots +- nightly (only select artifacts) + +All required repositories for the project must be declared explicitly within the `intellijPlatform` extension: + +```kotlin +repositories { + mavenCentral() + + intellijPlatform { + releases() + snapshots() + nightly() + } +} +``` + +### Setting up IntelliJ Platform + +Dependencies and [repositories](#intellij.repositories) are handled using explicit entries within `dependencies{}` and `repositories{}` blocks in build.gradle.kts file. + +A minimum configuration for targeting IntelliJ IDEA Community 2023.3: + +```kotlin +repositories { + mavenCentral() + + intellijPlatform { + releases() + } +} + + +dependencies { + intellijPlatform { + intellijIdeaCommunity("2023.3") + } +} +``` + +The `intellijIdeaCommunity` in the previous sample is one of extension functions available for adding IntelliJ SDK dependencies to the project. +Other IDEs can be targeted using one the extensions listed in the table below. + +| Extension | Target IDE | +|-------------------------|--------------------------------------------| +| `androidStudio` | [Android Studio](android_studio.md) | +| `clion` | [CLion](clion.md) | +| `gateway` | Gateway | +| `goland` | [GoLand](goland.md) | +| `intellijIdeaCommunity` | [IntelliJ IDEA Community Edition](idea.md) | +| `intellijIdeaUltimate` | [](idea_ultimate.md) | +| `phpstorm` | [PhpStorm](phpstorm.md) | +| `pycharmCommunity` | [PyCharm Community Edition](pycharm.md) | +| `pycharmProfessional` | [PyCharm Professional](pycharm.md) | +| `rider` | [Rider](rider.md) | + +As a fallback, `intellijPlatform` extension can be used to allow dynamic configuration of the target platform, e.g., via build.properties. + +## Tasks + +TODO + +## Migration FAQ + +### Unresolved 'idea' plugin + +Add an explicit dependency on the plugin in build.gradle.kts: + +```kotlin +id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" +``` + + From 04cc07f8879481fbccec20ee515687581c61cff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 29 Jan 2024 09:32:31 +0100 Subject: [PATCH 02/54] tools_intellij_platform_gradle_plugin.md: initial, TOC --- ijs.tree | 1 + 1 file changed, 1 insertion(+) diff --git a/ijs.tree b/ijs.tree index 073d9092d..a835c5322 100644 --- a/ijs.tree +++ b/ijs.tree @@ -406,6 +406,7 @@ + From ad4b4c4497a7e06f21bcd1185b977ab1b0f91c4a Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 30 Jan 2024 15:46:27 +0100 Subject: [PATCH 03/54] tools_intellij_platform_gradle_plugin.md: repositories and dependencies configuration --- .../tools_intellij_platform_gradle_plugin.md | 290 ++++++++++++++++++ .../tools_intellij_platform_gradle_plugin.md | 180 ----------- v.list | 1 + 3 files changed, 291 insertions(+), 180 deletions(-) create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md delete mode 100644 topics/tools_intellij_platform_gradle_plugin.md diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md new file mode 100644 index 000000000..b2c1fa113 --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -0,0 +1,290 @@ + + +# IntelliJ Platform Gradle Plugin 2.x (EAP) + +IntelliJ Platform Gradle Plugin user and migration guide. + + + +**Current Release**: Early Access Preview + +**GitHub**: [Releases & Changelog](https://github.com/JetBrains/gradle-intellij-plugin/releases), [Issue Tracker](https://github.com/JetBrains/gradle-intellij-plugin/issues) + +**Slack**: [#intellij-platform-gradle-plugin](https://jetbrains-platform.slack.com/archives/C05C80200LS) on the [JetBrains Platform Slack](https://plugins.jetbrains.com/slack/) + + + +The _IntelliJ Platform Gradle Plugin 2.x_ is a plugin for the Gradle build system to help configure your environment for building, testing, verifying, and publishing plugins for IntelliJ-based IDEs. + +It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ in the future. + +> This plugin is currently in **Early Access** and may not support all features and project setups yet (see also [](#requirements)). +> Please report bugs or problems in the above-linked issue tracker or Slack channel. +> +> Any documentation issues on this page should be reported using the feedback form on the bottom of this page. +> +> Thanks a lot in advance for your feedback! +> +{title="Early Access Status" style="warning"} + +## Requirements + +The following platforms and environments are supported: + +- IntelliJ Platform: 2022.3 and later +- Java Runtime: 17 and later +- Gradle: 8.1 and later + +## Usage + +To use the current Early Access Preview snapshot versions, add to your settings.gradle.kts file: + +```kotlin +pluginManagement { + repositories { + maven("https://oss.sonatype.org/content/repositories/snapshots/") + gradlePluginPortal() + } +} +``` + +In the build.gradle.kts file, replace the existing reference to the [](tools_gradle_intellij_plugin.md) plugin (`org.jetbrains.intellij`) with: + +```kotlin +plugins { + id("org.jetbrains.intellij.platform") version "%intellij-platform-gradle-plugin-version%" +} +``` + +### Available Subplugins + +The plugin has a new ID: `org.jetbrains.intellij.platform`, but also was split into subplugins. +This approach allows you to choose between applying all configurations and tasks at once, or applying them separately, e.g., to only use an IntelliJ Platform SDK dependency without creating any tasks. + +#### org.jetbrains.intellij.platform + +{id="plugin.platform"} + +This plugin applies all project-level plugins, which brings the fully-flagged tooling for plugin development for IntelliJ-based IDEs. + +It includes [](#plugin.core) and [](#plugin.tasks) subplugins. + +#### org.jetbrains.intellij.platform.core + +{id="plugin.core"} + +Base plugin registers all necessary custom configurations and dependencies transformers used for handling IntelliJ Platform SDK, JetBrains Runtime, CLI tools, or other plugins when used as dependencies. + +#### org.jetbrains.intellij.platform.tasks + +{id="plugin.tasks"} + +Tasks plugin registers and preconfigures all tasks introduced by the IntelliJ Platform Gradle Plugin. +It can be omitted when referring to any IntelliJ Platform SDK dependencies without invoking tasks on project submodules. + +#### org.jetbrains.intellij.platform.settings + +{id="plugin.settings"} + +Settings plugin is required in settings.gradle.kts when using `RepositoryHandler` extensions when declaring the IntelliJ Maven repository (see [](intellij_artifacts.md)) for the `dependencyResolutionManagement` Gradle mechanism. + +## Configuration + +> Auto-completion, Quick Documentation, and other code insight features are available for many extension functions and properties. +> +{title="Exploring Configuration Options"} + +### Setting up repositories + +{id="configuration.repositories"} + +All IntelliJ Platform SDK artifacts are available via IntelliJ Maven repositories (see [](intellij_artifacts.md)), which exist in three variants: + +- releases +- snapshots +- nightly (only select artifacts) + +All required repositories for the project must be declared explicitly within the `intellijPlatform` extension: + +```kotlin +repositories { + mavenCentral() + + intellijPlatform { + releases() + snapshots() + nightly() + } +} +``` + +The `intellijPlatform` extension available for the `repositories {}` provides the following helper methods for adding repositories: + +| Name | Description | +|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| +| `releases` | IntelliJ Platform Releases repository. | +| `snapshots` | IntelliJ Platform Snapshots repository. | +| `nightly` | IntelliJ Platform Nightly repository, not available publicly. | +| `ivy` | Local Ivy repository for resolving local Ivy XML files used for describing artifacts like local IntelliJ Platform instance, bundled plugins, etc. | +| `marketplace` | JetBrains Marketplace Repository, hosts plugins for IntelliJ-based IDEs. | +| `jetbrainsRuntime` | JetBrains Runtime (JBR), CloudFront-based hosting from which specific JBR releases are fetched, if explicitly requested. | +| `binaryReleasesAndroidStudio` | Android Studio Binary Releases, required when running IntelliJ Plugin Verifier against Android Studio releases. | +| `binaryReleases` | IntelliJ IDEA Binary Releases, required when running IntelliJ Plugin Verifier against JetBrains IntelliJ-based IDE releases. | +| `recommended` | Applies a set of recommended repositories. | + +#### Dependency Resolution Management + +{id="configuration.dependencyResolutionManagement"} + +To access the IntelliJ Platform Gradle Plugin within the settings.gradle.kts to use with `dependencyResolutionManagement`, add: + +```kotlin +import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform + +plugins { + id("org.jetbrains.intellij.platform.settings") version "%intellij-platform-gradle-plugin-version%" +} + +dependencyResolutionManagement { + repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS + + repositories { + mavenCentral() + + intellijPlatform { + recommended() + } + } +} +``` + +#### Cache Redirector + +{id="configuration.cacheRedirector"} + +Some repositories, by default, point to JetBrains Cache Redirector to provide better resources resolution. +However, it is possible to use the direct repository URL, if available. + +To switch off the default usage of JetBrains Cache Redirector, add to gradle.properties: + +``` +org.jetbrains.intellij.platform.buildFeature.useCacheRedirector=false +``` + +### Setting up IntelliJ Platform + +Dependencies and [repositories](#configuration.repositories) are handled using explicit entries within `dependencies {}` and `repositories {}` blocks in build.gradle.kts file. + +A minimum configuration for targeting IntelliJ IDEA Community 2023.3: + +```kotlin +repositories { + mavenCentral() + + intellijPlatform { + recommended() + } +} + +dependencies { + intellijPlatform { + intellijIdeaCommunity("2023.3") + } +} +``` + +The `intellijIdeaCommunity` in the previous sample is one of extension functions available for adding IntelliJ Platform dependencies to the project. +Other IDEs can be targeted using one the extensions listed in the table below. + +| Extension | Target IDE | +|-------------------------|--------------------------------------------| +| `androidStudio` | [Android Studio](android_studio.md) | +| `clion` | [CLion](clion.md) | +| `fleetBackend` | Fleet Backend | +| `gateway` | Gateway | +| `goland` | [GoLand](goland.md) | +| `intellijIdeaCommunity` | [IntelliJ IDEA Community Edition](idea.md) | +| `intellijIdeaUltimate` | [](idea_ultimate.md) | +| `phpstorm` | [PhpStorm](phpstorm.md) | +| `pycharmCommunity` | [PyCharm Community Edition](pycharm.md) | +| `pycharmProfessional` | [PyCharm Professional](pycharm.md) | +| `rider` | [Rider](rider.md) | +| `rustRover` | Rust Rover | +| `writerside` | Writerside | + +#### Parametrized IntelliJ Platform dependency + +As a fallback, `intellijPlatform` extension can be used to allow dynamic configuration of the target platform, e.g., via gradle.properties: + +``` +platformType = IC +platformVersion = 2023.3 +``` + +The above Gradle properties can be referenced in the build.gradle.kts file with: + +```kotlin +dependencies { + intellijPlatform { + val type = providers.gradleProperty("platformType") + val version = providers.gradleProperty("platformVersion") + + intellijPlatform(type, version) + } +} +``` + +The `intellijPlatform` helper accepts also the `IntelliJPlatformType` enum type: + +```kotlin +import org.jetbrains.intellij.platform.gradle.utils.IntelliJPlatformType + +dependencies { + intellijPlatform { + val version = providers.gradleProperty("platformVersion") + + intellijPlatform(IntelliJPlatformType.IntellijIdeaUltimate, version) + } +} +``` + +#### Local IntelliJ Platform IDE instance + +It is possible to refer to the locally available IntelliJ-based IDE using the `local` helper function: + +```kotlin +repositories { + intellijPlatform { + ... + ivy() + } +} + +dependencies { + intellijPlatform { + local("/Users/hsz/Applications/IntelliJ IDEA Ultimate.app") + } +} +``` + +Note that the `ivy` entry needs to be added to the `repositories {}` block as all local dependencies (local IDE, bundled plugins, etc.) rely on the Ivy repositories. + +### Setting up plugin dependencies + +TODO + +## Tasks + +TODO + +## Migration FAQ + +### Unresolved 'idea' plugin + +Add an explicit dependency on the plugin in build.gradle.kts: + +```kotlin +id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" +``` + + diff --git a/topics/tools_intellij_platform_gradle_plugin.md b/topics/tools_intellij_platform_gradle_plugin.md deleted file mode 100644 index 2f8cc3dd5..000000000 --- a/topics/tools_intellij_platform_gradle_plugin.md +++ /dev/null @@ -1,180 +0,0 @@ - - -# IntelliJ Platform Gradle Plugin 2.x (EA) - -IntelliJ Platform Gradle Plugin user and migration guide. - - - -**Current Release**: Early Access - -**GitHub**: [Releases & Changelog](https://github.com/JetBrains/gradle-intellij-plugin/releases), [Issue Tracker](https://github.com/JetBrains/gradle-intellij-plugin/issues) - -**Slack**: [#intellij-platform-gradle-plugin](https://jetbrains-platform.slack.com/archives/C05C80200LS) on the [JetBrains Platform Slack](https://plugins.jetbrains.com/slack/) - - - -The _IntelliJ Platform Gradle Plugin 2.x_ is a plugin for the Gradle build system to help configure your environment for -building, testing, verifying, and publishing plugins for IntelliJ-based IDEs. - -It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ in the future. - -> This plugin is currently in **Early Access** and may not support all features and project setups yet (see also [](#requirements)). -> Please report bugs or problems in the above-linked issue tracker or Slack channel. -> -> Any documentation issues on this page should be reported using the feedback form on the bottom of this page. -> -> Thanks a lot in advance for your feedback! -> -{title="Early Access Status" style="warning"} - -## Requirements - -The following platforms and environments are supported: - -- IntelliJ Platform: 2022.3 and later -- Java Runtime: 17 and later -- Gradle: 8.0 and later - -## Usage - -To use the current Early Access snapshot versions, add to your settings.gradle.kts file: - -```kotlin -pluginManagement { - repositories { - maven("https://oss.sonatype.org/content/repositories/snapshots/") - gradlePluginPortal() - } -} -``` - -In the build.gradle.kts file, replace the existing reference to the [](tools_gradle_intellij_plugin.md) plugin (`org.jetbrains.intellij`) with: - -```kotlin -plugins { - id("org.jetbrains.intellij.platform") version "2.0.0-SNAPSHOT" -} -``` - -### Available Subplugins - -The plugin has a new ID: `org.jetbrains.intellij.platform`, but also was split into subplugins. -This approach allows you to choose between applying all configurations and tasks at once, or applying them separately, e.g., -to only use an IntelliJ SDK dependency without creating any tasks. - -#### org.jetbrains.intellij.platform - -{id="plugin.platform"} - -This plugin applies all project-level plugins, which brings the fully-flagged tooling for plugin development for IntelliJ-based IDEs. - -It includes [](#plugin.base) and [](#plugin.tasks) subplugins. - -#### org.jetbrains.intellij.platform.base - -{id="plugin.base"} - -Base plugin registers all necessary custom configurations and dependencies transformers used for handling IntelliJ SDK, -JetBrains Runtime, or other plugins when used as dependencies. - -#### org.jetbrains.intellij.platform.tasks - -{id="plugin.tasks"} - -Tasks plugin registers and preconfigures all tasks introduced by the IntelliJ Platform Gradle Plugin. -It can be omitted when referring to any IntelliJ SDK dependencies without invoking tasks on project submodules. - -#### org.jetbrains.intellij.platform.settings - -{id="plugin.settings"} - -Settings plugin is required in settings.gradle.kts when using `RepositoryHandler` extensions when declaring the -IntelliJ Maven repository (see [](intellij_artifacts.md)) for the `dependencyResolutionManagement` Gradle mechanism. - -## Configuration - -> Auto-completion, Quick Documentation, and other code insight features are available for many extension functions and properties. -> -{title="Exploring Configuration Options"} - -### Setting up IntelliJ Repositories - -{id="intellij.repositories"} - -All IntelliJ SDK artifacts are available via IntelliJ Maven repositories (see [](intellij_artifacts.md)), which exist in three variants: - -- releases -- snapshots -- nightly (only select artifacts) - -All required repositories for the project must be declared explicitly within the `intellijPlatform` extension: - -```kotlin -repositories { - mavenCentral() - - intellijPlatform { - releases() - snapshots() - nightly() - } -} -``` - -### Setting up IntelliJ Platform - -Dependencies and [repositories](#intellij.repositories) are handled using explicit entries within `dependencies{}` and `repositories{}` blocks in build.gradle.kts file. - -A minimum configuration for targeting IntelliJ IDEA Community 2023.3: - -```kotlin -repositories { - mavenCentral() - - intellijPlatform { - releases() - } -} - - -dependencies { - intellijPlatform { - intellijIdeaCommunity("2023.3") - } -} -``` - -The `intellijIdeaCommunity` in the previous sample is one of extension functions available for adding IntelliJ SDK dependencies to the project. -Other IDEs can be targeted using one the extensions listed in the table below. - -| Extension | Target IDE | -|-------------------------|--------------------------------------------| -| `androidStudio` | [Android Studio](android_studio.md) | -| `clion` | [CLion](clion.md) | -| `gateway` | Gateway | -| `goland` | [GoLand](goland.md) | -| `intellijIdeaCommunity` | [IntelliJ IDEA Community Edition](idea.md) | -| `intellijIdeaUltimate` | [](idea_ultimate.md) | -| `phpstorm` | [PhpStorm](phpstorm.md) | -| `pycharmCommunity` | [PyCharm Community Edition](pycharm.md) | -| `pycharmProfessional` | [PyCharm Professional](pycharm.md) | -| `rider` | [Rider](rider.md) | - -As a fallback, `intellijPlatform` extension can be used to allow dynamic configuration of the target platform, e.g., via build.properties. - -## Tasks - -TODO - -## Migration FAQ - -### Unresolved 'idea' plugin - -Add an explicit dependency on the plugin in build.gradle.kts: - -```kotlin -id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" -``` - - diff --git a/v.list b/v.list index 2bb3f8cb1..663e5aa0a 100644 --- a/v.list +++ b/v.list @@ -21,4 +21,5 @@ + From 4f96f242c0b23e076c53390c5a4c7330306d206e Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Wed, 31 Jan 2024 15:08:16 +0100 Subject: [PATCH 04/54] IntelliJ Platform Gradle Plugin: tasks (`patchPluginXml`), extensions (`intellijPlatform`), new content structure --- ijs.tree | 10 +- .../tools_intellij_platform_gradle_plugin.md | 12 +- ...j_platform_gradle_plugin_build_features.md | 100 ++++ ...rm_gradle_plugin_dependencies_extension.md | 8 + ...tellij_platform_gradle_plugin_extension.md | 510 ++++++++++++++++++ ...tellij_platform_gradle_plugin_migration.md | 34 ++ ...rm_gradle_plugin_repositories_extension.md | 8 + ...llij_platform_gradle_plugin_task_awares.md | 39 ++ ...s_intellij_platform_gradle_plugin_tasks.md | 450 ++++++++++++++++ 9 files changed, 1162 insertions(+), 9 deletions(-) create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md diff --git a/ijs.tree b/ijs.tree index a835c5322..376d2c33c 100644 --- a/ijs.tree +++ b/ijs.tree @@ -406,7 +406,15 @@ - + + + + + + + + + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index b2c1fa113..4f6e8910e 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -150,7 +150,7 @@ dependencyResolutionManagement { repositories { mavenCentral() - + intellijPlatform { recommended() } @@ -165,11 +165,7 @@ dependencyResolutionManagement { Some repositories, by default, point to JetBrains Cache Redirector to provide better resources resolution. However, it is possible to use the direct repository URL, if available. -To switch off the default usage of JetBrains Cache Redirector, add to gradle.properties: - -``` -org.jetbrains.intellij.platform.buildFeature.useCacheRedirector=false -``` +To switch off the default usage of JetBrains Cache Redirector, see the [](tools_intellij_platform_gradle_plugin_build_features.md#useCacheRedirector) build feature. ### Setting up IntelliJ Platform @@ -228,7 +224,7 @@ dependencies { intellijPlatform { val type = providers.gradleProperty("platformType") val version = providers.gradleProperty("platformVersion") - + intellijPlatform(type, version) } } @@ -242,7 +238,7 @@ import org.jetbrains.intellij.platform.gradle.utils.IntelliJPlatformType dependencies { intellijPlatform { val version = providers.gradleProperty("platformVersion") - + intellijPlatform(IntelliJPlatformType.IntellijIdeaUltimate, version) } } diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md new file mode 100644 index 000000000..d65fe0767 --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md @@ -0,0 +1,100 @@ + + +# Build Features + +IntelliJ Platform Gradle Plugin build features. + + +The IntelliJ Platform Gradle Plugin build features dedicated to control some of the low-level Gradle plugin behaviors. +To enable or disable a particular feature, add a Project property to the gradle.properties file with the following pattern: + +``` +org.jetbrains.intellij.buildFeature.= +``` + +E.g., to disable the [](#selfUpdateCheck) feature, add this line: + +``` +org.jetbrains.intellij.platform.buildFeature.selfUpdateCheck=false +``` + + +## noSearchableOptionsWarning +{#noSearchableOptionsWarning} + +When the [](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) doesn't produce any results, e.g., when the plugin doesn't implement any [Settings](settings.md), a warning is shown to suggest disabling it for better performance with [](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions). + +{style="narrow"} +Default value +: `true` + +Example +: +``` +org.jetbrains.intellij.buildFeature.buildSearchableOptions=false +``` + +See also: +- [Tasks: buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) +- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) + + +## paidPluginSearchableOptionsWarning +{#paidPluginSearchableOptionsWarning} + +Due to IDE limitations, it is impossible to run the IDE in headless mode to collect searchable options for a paid plugin. +As paid plugins require providing a valid license and presenting a UI dialog, it is impossible to handle such a case, and the task will fail. +This feature flag displays the given warning when the task is run by a paid plugin. + +{style="narrow"} +Default value +: `true` + +Example +: +``` +org.jetbrains.intellij.platform.buildFeature.paidPluginSearchableOptionsWarning=false +``` + + +## selfUpdateCheck +{#selfUpdateCheck} + +Checks whether the currently used Gradle IntelliJ Plugin is outdated and if a new release is available. +The plugin performs an update check on every run asking the GitHub Releases page for the redirection URL +to the latest version with `HEAD` HTTP request: `https://github.com/jetbrains/gradle-intellij-plugin/releases/latest`. + +If the current version is outdated, the plugin will emit a warning with its current and the latest version. + +Feature respects the Gradle [`--offline`](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_execution_options) mode. + +> It is strongly suggested to always use the latest available version. Older plugin versions may also not fully support the latest IDE releases. + +{style="narrow"} +Default value +: `true` + +Example +: +``` +org.jetbrains.intellij.platform.buildFeature.selfUpdateCheck=false +``` + + +## useCacheRedirector +{#useCacheRedirector} + +By default, JetBrains Cache Redirector is used when resolving Maven repositories or any resources used by the IntelliJ Platform Gradle Plugin. +Due to limitations, sometimes it is desired to limit the list of remote endpoints accessed by Gradle. + +It is possible to refer to the direct location (whenever it is possible) by switching off JetBrains Cache Redirector globally. + +{style="narrow"} +Default value +: `true` + +Example +: +``` +org.jetbrains.intellij.platform.buildFeature.useCacheRedirector=false +``` diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md new file mode 100644 index 000000000..23b1c81b6 --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -0,0 +1,8 @@ + + +# Dependencies Extension + +IntelliJ Platform Gradle Plugin dependencies extension. + + + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md new file mode 100644 index 000000000..af51dea8c --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -0,0 +1,510 @@ + + +# IntelliJ Platform Extension + +IntelliJ Platform Gradle Plugin extension. + +The _IntelliJ Platform Gradle Plugin_ introduces a top-level `intellijPlatform` extension. +It consists of sections dedicated to the general Gradle plugin configuration, plugin.xml definition, publishing, signing, and verifying of the output plugin for IntelliJ-based IDEs. + +## IntelliJ Platform +{#intellijPlatform} + +After the IntelliJ Platform Gradle Plugin is applied, the `intellijPlatform` extension can be used to configure the plugin and common settings of the provided tasks. + +**Example:** + +```kotlin +intellijPlatform { + instrumentCode.set(true) + buildSearchableOptions.set(true) + sandboxContainer.set("...") + + pluginConfiguration { ... } + publishing { ... } + signing { ... } + verifyPlugin { ... } +} +``` + +### instrumentCode +{#intellijPlatform-instrumentCode} + +> Not implemented. +> +{style="warning"} + +Enables the compiled classes instrumentation. +The compiled code will be enhanced with: +- nullability assertions +- post-processing of forms created by IntelliJ GUI Designer + +Controls the execution of the [](tools_intellij_platform_gradle_plugin_tasks.md#instrumentCode) task. + +{style="narrow"} +Type +: `Property` + +Default value +: `true` + +See also: +- [Tasks: `instrumentCode`](tools_intellij_platform_gradle_plugin_tasks.md#instrumentCode) + + +### buildSearchableOptions +{#intellijPlatform-buildSearchableOptions} + +Builds an index of UI components (searchable options) for the plugin. +Controls the execution of the [](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) task. + +{style="narrow"} +Type +: `Property` + +Default value +: `true` + +See also: +- [Tasks: `buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) +- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) + + +### sandboxContainer +{#intellijPlatform-sandboxContainer} + +The path to the sandbox container where tests and IDE instances read and write data. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: build/ + +See also: +- [Tasks: `prepareSandbox`](tools_intellij_platform_gradle_plugin_tasks.md#prepareSandbox) +- [Task Awares: `SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) + + +## Plugin Configuration +{#intellijPlatform-pluginConfiguration} + +Configures the plugin definition and stores in the `plugin.xml` file. +Data provided to the `intellijPlatform.pluginConfiguration {}` extension is passed to the [](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml) task, which overrides the plugin.xml file with new values. + +**Example:** + +```kotlin +intellijPlatform { + ... + + pluginConfiguration { + id.set("my-plugin-id") + name.set("My Awesome Plugin") + version.set("1.0.0") + description.set("It's an awesome plugin!") + changeNotes.set( + """ + A descriptive release note... + """.trimIndent() + ) + + productDescriptor { ... } + ideaVersion { ... } + vendor { ... } + } +} +``` + +See also: +- [](#intellijPlatform-pluginConfiguration-productDescriptor) +- [](#intellijPlatform-pluginConfiguration-ideaVersion) +- [](#intellijPlatform-pluginConfiguration-vendor) + + +### id +{#intellijPlatform-pluginConfiguration-id} + +The plugin's unique identifier. +This should mirror the structure of fully qualified Java packages and must remain distinct from the IDs of existing plugins. +This ID is a technical descriptor used not only within the IDE, but also on [JetBrains Marketplace](https://plugins.jetbrains.com/). + +Please restrict input to characters, numbers, and `.`/`-`/`_` symbols , and aim for a concise length. + +The entered value will populate the `` element. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.pluginId`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-pluginId) +- [Plugin Configuration File: `id`](plugin_configuration_file.md#idea-plugin__id) + + +### name +{#intellijPlatform-pluginConfiguration-name} + +The plugin display name, visible to users (Title Case). + +The inputted value will be used to populate the `` element. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.pluginName`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-pluginName) +- [Plugin Configuration File: `name`](plugin_configuration_file.md#idea-plugin__name) + + +### version +{#intellijPlatform-pluginConfiguration-version} + +The plugin version, presented in the Plugins settings dialog and on its JetBrains Marketplace page. + +For plugins uploaded to the JetBrains Marketplace, semantic versioning must be adhered to. + +The specified value will be used as an `` element. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.pluginVersion`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-pluginVersion) +- [Plugin Configuration File: `version`](plugin_configuration_file.md#idea-plugin__version) + + +### description +{#intellijPlatform-pluginConfiguration-description} + +The plugin description, which is presented on the JetBrains Marketplace plugin page and in the Plugins settings dialog. +Basic HTML elements such as text formatting, paragraphs, and lists are permitted. + +The description content is automatically enclosed by ``. + +The supplied value will populate the `` element. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.pluginDescription`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-pluginDescription) +- [Plugin Configuration File: `description`](plugin_configuration_file.md#idea-plugin__description) + + +### changeNotes +{#intellijPlatform-pluginConfiguration-changeNotes} + +A concise summary of new features, bug fixes, and alterations provided in the latest plugin version. +These change notes will be displayed on the JetBrains Marketplace plugin page and in the Plugins settings dialog. +Basic HTML elements such as text formatting, paragraphs, and lists are permitted. + +The change notes content is automatically encapsulated in ``. + +The inputted value will populate the `` element. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.changeNotes`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-changeNotes) +- [Plugin Configuration File: `change-notes`](plugin_configuration_file.md#idea-plugin__change-notes) + + +## Product Descriptor +{#intellijPlatform-pluginConfiguration-productDescriptor} + +A part of the [](#intellijPlatform-pluginConfiguration) which describes the `product-descriptor` element. + +**Example:** + +```kotlin +intellijPlatform { + ... + + pluginConfiguration { + ... + + productDescriptor { + code.set("MY_CODE") + releaseDate.set("20240217") + releaseVersion.set("") + optional.set("") + } + } +} +``` + + +### code +{#intellijPlatform-pluginConfiguration-productDescriptor-code} + +The product code for the plugin, used in the JetBrains Sales System, needs to be pre-approved by JetBrains and must adhere to [specified requirements](https://plugins.jetbrains.com/docs/marketplace/obtain-a-product-code-from-jetbrains.html). + +The given value will be utilized as a `` element attribute. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.productDescriptorCode`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-productDescriptorCode) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### releaseDate +{#intellijPlatform-pluginConfiguration-productDescriptor-releaseDate} + +The release date of the major version, formatted as `YYYYMMDD`. + +The supplied value will be used to populate the `` element attribute. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.productDescriptorReleaseDate`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-productDescriptorReleaseDate) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### releaseVersion +{#intellijPlatform-pluginConfiguration-productDescriptor-releaseVersion} + +The major version, represented in a specific numerical format. + +The given value will be used as the `` element attribute. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.productDescriptorReleaseVersion`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-productDescriptorReleaseVersion) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### optional +{#intellijPlatform-pluginConfiguration-productDescriptor-optional} + +The boolean value that indicates if the plugin is a [Freemium](https://plugins.jetbrains.com/docs/marketplace/freemium.html) plugin. + +The inputted value will be used for the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: `false` + +See also: +- [Tasks: `patchPluginXml.productDescriptorOptional`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-productDescriptorOptional) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +## IDEA Version +{#intellijPlatform-pluginConfiguration-ideaVersion} + +Configures the `idea-version` section of the plugin. + +A part of the [](#intellijPlatform-pluginConfiguration) which describes the `idea-version` element. + +**Example:** + +```kotlin +intellijPlatform { + ... + + pluginConfiguration { + ... + + ideaVersion { + sinceBuild.set("241") + untilBuild.set("241.*") + } + } +} +``` + +### sinceBuild +{#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild} + +The earliest IDE version that is compatible with the plugin. + +The supplied value will be utilized as the `` element attribute. + +The default value is set to the `MAJOR.MINOR` version based on the currently selected IntelliJ Platform, like `233.12345`. + +{style="narrow"} +Type +: `Property` + +Default value +: `MAJOR.MINOR` + +See also: +- [Tasks: `patchPluginXml.sinceBuild`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-sinceBuild) +- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) + + +### untilBuild +{#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild} + +The latest IDE version that is compatible with the plugin. An undefined value signifies compatibility with all IDEs starting from the version mentioned in `since-build`, including potential future builds that may cause compatibility issues. + +The given value will be assigned to the `` element attribute. + +The default value is set to the `MAJOR.*` version based on the currently selected IntelliJ Platform, such as `233.*`. + +{style="narrow"} +Type +: `Property` + +Default value +: `MAJOR.*` + +See also: +- [Tasks: `patchPluginXml.untilBuild`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-untilBuild) +- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) + + +## Vendor +{#intellijPlatform-pluginConfiguration-vendor} + +Configures the `idea-version` section of the plugin. + +A part of the [](#intellijPlatform-pluginConfiguration) which describes the `vendor` element. + +**Example:** + +```kotlin +intellijPlatform { + ... + + pluginConfiguration { + ... + + vendor { + name.set("JetBrains") + email.set("hello@jetbrains.com") + url.set("https://www.jetbrains.com") + } + } +} +``` + + +### name +{#intellijPlatform-pluginConfiguration-vendor-name} + +The name of the vendor or the organization ID (if created), as displayed in the Plugins settings dialog and on the JetBrains Marketplace plugin page. + +The supplied value will be used as the value for the `` element. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.vendorName`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-vendorName) +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) + + +### email +{#intellijPlatform-pluginConfiguration-vendor-email} + +The email address of the vendor. + +The given value will be utilized as the `` element attribute. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.vendorEmail`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-vendorEmail) +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) + + +### url +{#intellijPlatform-pluginConfiguration-vendor-url} + +The URL to the vendor's homepage. + +The supplied value will be assigned to the `` element attribute. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.vendorUrl`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-vendorUrl) +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) + + +## Publishing +{#intellijPlatform-publishing} + +Configures the publishing process of the plugin. +All values are passed to the [](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin) task. + +**Example:** + +```kotlin +intellijPlatform { + ... + + publishing { + host.set("") + token.set("7hR4nD0mT0k3n_8f2eG") + channel.set("default") + toolboxEnterprise.set(false) + hidden.set(false) + } +} +``` + +### host +{#intellijPlatform-publishing-host} + +The hostname used for publishing the plugin. + +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `patchPluginXml.vendorUrl`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin) + +### token +{#intellijPlatform-publishing-token} + + +### channel +{#intellijPlatform-publishing-channel} + + +### toolboxEnterprise +{#intellijPlatform-publishing-toolboxEnterprise} + + +### hidden +{#intellijPlatform-publishing-hidden} + + + +## Signing +{#intellijPlatform-signing} + + +## Verify Plugin +{#intellijPlatform-verifyPlugin} + + + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md new file mode 100644 index 000000000..bfbc9f927 --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md @@ -0,0 +1,34 @@ + + +# Migration Guide from Gradle IntelliJ Plugin + +This is the IntelliJ Platform Gradle Plugin migration guide from the Gradle IntelliJ Plugin 1.x + +## Plugin name change +As the `2.x` branch brings significant breaking changes to the plugin, we also decided to change its name from _Gradle IntelliJ Plugin_ to _IntelliJ Platform Gradle Plugin_ as the old one was confused with the Gradle support plugin for IntelliJ-based IDEs. +The plugin is published to the Gradle Plugin Portal with a new name as a new entry, and the old one is marked as deprecated. + +## Plugin ID change +Plugin ID has changed from `org.jetbrains.intellij` to `org.jetbrains.intellij.platform`. +To apply is, use: + +```kotlin +plugins { + id("org.jetbrains.intellij.platform") +} +``` + +## Minimal Gradle version +The minimal required Gradle version is now `8.0`. + +## `intellij` extension +The `intellij {}` extension is no longer available and was replaced with `intellijPlatform {}` — note that the available properties differ. + +## `setupDependencies` task +To make IntelliJ SDK dependency available in the IDE for class resolution and code completion, there was the `setupDependencies` task introduced in the Gradle IntelliJ Plugin 1.x. +With IntelliJ Platform Gradle Plugin, such a task is no longer required, but if you are switching from the previous approach, Gradle still may want to execute it in the _afterSync_ phase. +To completely drop this approach, it is mandatory to remove its reference manualy in your IDE: + +1. Open Gradle Tool Window +2. Right-click on the main module and select _Tasks Activation_ +3. In the _Tasks Activation_ modal window, find and remove the `setupDependencies` entry. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md new file mode 100644 index 000000000..32a72673d --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md @@ -0,0 +1,8 @@ + + +# Repositories Extension + +IntelliJ Platform Gradle Plugin repositories extension. + + + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md new file mode 100644 index 000000000..303fa26cc --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -0,0 +1,39 @@ + + +# Task Awares + +IntelliJ Platform Gradle Plugin task `*Aware` interfaces. + +## CoroutinesJavaAgentAware +{#CoroutinesJavaAgentAware} + + +## CustomIntelliJPlatformVersionAware +{#CustomIntelliJPlatformVersionAware} + + +## IntelliJPlatformVersionAware +{#IntelliJPlatformVersionAware} + + +## PluginVerifierAware +{#PluginVerifierAware} + + +## RunnableIdeAware +{#RunnableIdeAware} + + +## RuntimeAware +{#RuntimeAware} + + +## SandboxAware +{#SandboxAware} + + +## SigningAware +{#SigningAware} + + + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md new file mode 100644 index 000000000..64f5aa738 --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -0,0 +1,450 @@ + + +# Tasks + +IntelliJ Platform Gradle Plugin tasks. + +## buildPlugin +{#buildPlugin} + + +## buildSearchableOptions +{#buildSearchableOptions} + +See also: +- [Extension: `intellijPlatform.buildSearchableOptions`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions) +- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) + + +## classpathIndexCleanup +{#classpathIndexCleanup} + + +## initializeIntelliJPlatformPlugin +{#initializeIntelliJPlatformPlugin} + + +## instrumentCode +{#instrumentCode} + +> Not implemented. +> +{style="warning"} + +See also: +- [Extension: `intellijPlatform.instrumentCode`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-instrumentCode) + + +## instrumentedJar +{#instrumentedJar} + + +## jarSearchableOptions +{#jarSearchableOptions} + + +## patchPluginXml +{#patchPluginXml} + + +### inputFile +{#patchPluginXml-inputFile} + +Represents an input `plugin.xml` file. + +By default, a plugin.xml file is picked from the main resource location. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value: +: src/main//resources/META-INF/plugin.xml + + +### outputFile +{#patchPluginXml-outputFile} + +Represents the output plugin.xml file property for a task. + +By default, the file is written to a temporary task directory within the build directory. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: build/tmp/patchPluginXml/plugin.xml + +### pluginId +{#patchPluginXml-pluginId} + +A unique identifier of the plugin. + +It should be a fully qualified name similar to Java packages and must not collide with the ID of existing plugins. +The ID is a technical value used to identify the plugin in the IDE and [JetBrains Marketplace](https://plugins.jetbrains.com/). + +Please use characters, numbers, and `.`/`-`/`_` symbols only and keep it reasonably short. + +The provided value will be set as a value of the `` element. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.id`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-id) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.id`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-id) +- [Plugin Configuration File: `id`](plugin_configuration_file.md#idea-plugin__id) + + +### pluginName +{#patchPluginXml-pluginName} + +The user-visible plugin display name (Title Case). + +The provided value will be set as a value of the `` element. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) +- [Plugin Configuration File: `name`](plugin_configuration_file.md#idea-plugin__name) + + +### pluginVersion +{#patchPluginXml-pluginVersion} + +The plugin version is displayed in the Plugins settings dialog and on the JetBrains Marketplace plugin page. + +Plugins uploaded to the JetBrains Marketplace must follow semantic versioning. + +The provided value will be set as a value of the `` element. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.version`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-version) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.version`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-version) +- [Plugin Configuration File: `version`](plugin_configuration_file.md#idea-plugin__version) + + +### pluginDescription +{#patchPluginXml-pluginDescription} + +The plugin description is displayed on the JetBrains Marketplace plugin page and in the Plugins settings dialog. +Simple HTML elements, like text formatting, paragraphs, lists, etc., are allowed. + +The description content is automatically wrapped with ``. + +The provided value will be set as a value of the `` element. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.description`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-description) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.description`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-description) +- [Plugin Configuration File: `description`](plugin_configuration_file.md#idea-plugin__description) + + +### changeNotes +{#patchPluginXml-changeNotes} + +A short summary of new features, bugfixes, and changes provided with the latest plugin version. +Change notes are displayed on the JetBrains Marketplace plugin page and in the Plugins settings dialog. +Simple HTML elements, like text formatting, paragraphs, lists, etc., are allowed. + +The change notes content is automatically wrapped with ``. + +The provided value will be set as a value of the `` element. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.changeNotes`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-changeNotes) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.changeNotes`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-changeNotes) +- [Plugin Configuration File: `change-notes`](plugin_configuration_file.md#idea-plugin__change-notes) + + +### productDescriptorCode +{#patchPluginXml-productDescriptorCode} + +The plugin product code used in the JetBrains Sales System. +The code must be agreed with JetBrains in advance and follow [the requirements](https://plugins.jetbrains.com/docs/marketplace/obtain-a-product-code-from-jetbrains.html). + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.productDescriptor.code`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-code) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.code`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-code) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### productDescriptorReleaseDate +{#patchPluginXml-productDescriptorReleaseDate} + +Date of the major version release in the `YYYYMMDD` format. + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.productDescriptor.releaseDate`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseDate) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.releaseDate`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseDate) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### productDescriptorReleaseVersion +{#patchPluginXml-productDescriptorReleaseVersion} + +A major version in a special number format. + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.productDescriptor.releaseVersion`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseVersion) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.releaseVersion`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseVersion) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### productDescriptorOptional +{#patchPluginXml-productDescriptorOptional} + +The boolean value determining whether the plugin is a [Freemium](https://plugins.jetbrains.com/docs/marketplace/freemium.html) plugin. + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.productDescriptor.optional`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-optional) + +Default value +: `false` + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.optional`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-optional) +- [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) + + +### sinceBuild +{#patchPluginXml-sinceBuild} + +The lowest IDE version compatible with the plugin. + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild) +- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) + + +### untilBuild +{#patchPluginXml-untilBuild} + +The highest IDE version compatible with the plugin. +Undefined value declares compatibility with all the IDEs since the version specified by the `since-build` (also with the future builds that may cause incompatibility errors). + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.ideaVersion.untilBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.ideaVersion.untilBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild) +- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) + + +### vendorName +{#patchPluginXml-vendorName} + +The vendor name or organization ID (if created) in the Plugins settings dialog and on the JetBrains Marketplace plugin page. + +The provided value will be set as a value of the `` element. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.vendor.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-name) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.vendor.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-name) +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) + + +### vendorEmail +{#patchPluginXml-vendorEmail} + +The vendor's email address. + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.vendor.email`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-email) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.vendor.email`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-email) +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) + + +### vendorUrl +{#patchPluginXml-vendorUrl} + +The link to the vendor's homepage. + +The provided value will be set as a value of the `` element attribute. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.vendor.url`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-url) + +See also: +- [Extension: `intellijPlatform.pluginConfiguration.vendor.url`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-url) +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) + + +## prepareSandbox +{#prepareSandbox} + +See also: +- [Extension: `intellijPlatform.sandboxContainer`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-sandboxContainer) +- [Task Awares: `SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) + + +## printBundledPlugins +{#printBundledPlugins} + + +## printProductsReleases +{#printProductsReleases} + + +## publishPlugin +{#publishPlugin} + + +### archiveFile +{#publishPlugin-archiveFile} + + +### host +{#publishPlugin-host} + + +### token +{#publishPlugin-token} + + +### channels +{#publishPlugin-channels} + + +### hidden +{#publishPlugin-hidden} + + +### toolboxEnterprise +{#publishPlugin-toolboxEnterprise} + + + + +## runIdePerformanceTest +{#runIdePerformanceTest} + + +## runIde +{#runIde} + + +## setupDependencies +{#setupDependencies} + + +## signPlugin +{#signPlugin} + + +## testIde +{#testIde} + + +## testIdeUi +{#testIdeUi} + + +## verifyPluginProjectConfiguration +{#verifyPluginProjectConfiguration} + + +## verifyPluginSignature +{#verifyPluginSignature} + + +## verifyPluginStructure +{#verifyPluginStructure} + + +## verifyPlugin +{#verifyPlugin} + + + From 305c64fc9bd34344f537dfb1478c9147a7a742d0 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Wed, 31 Jan 2024 17:29:30 +0100 Subject: [PATCH 05/54] IntelliJ Platform Gradle Plugin: review fixes --- .../tools_intellij_platform_gradle_plugin.md | 35 ++++++++++-------- ...tellij_platform_gradle_plugin_extension.md | 37 +++++++++++++++++-- 2 files changed, 53 insertions(+), 19 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 4f6e8910e..4d742a2ee 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -37,7 +37,11 @@ The following platforms and environments are supported: ## Usage -To use the current Early Access Preview snapshot versions, add to your settings.gradle.kts file: +> Please note that the plugin has a new ID `org.jetbrain.intellij.platform`. +> +{style="note"} + +To use the current Early Access Preview snapshot versions, add the following to your settings.gradle.kts file: ```kotlin pluginManagement { @@ -56,10 +60,10 @@ plugins { } ``` -### Available Subplugins +### Subplugins -The plugin has a new ID: `org.jetbrains.intellij.platform`, but also was split into subplugins. -This approach allows you to choose between applying all configurations and tasks at once, or applying them separately, e.g., to only use an IntelliJ Platform SDK dependency without creating any tasks. +The plugin was split into subplugins that can be applied separately. +This allows for applying only a subset of features, e.g. when you only use an IntelliJ Platform SDK dependency without creating any tasks. #### org.jetbrains.intellij.platform @@ -73,7 +77,7 @@ It includes [](#plugin.core) and [](#plugin.tasks) subplugins. {id="plugin.core"} -Base plugin registers all necessary custom configurations and dependencies transformers used for handling IntelliJ Platform SDK, JetBrains Runtime, CLI tools, or other plugins when used as dependencies. +The base plugin sets up all the custom configurations and transforms needed to manage the IntelliJ Platform SDK, JetBrains Runtime, CLI tools, and other plugins when they're added as dependencies. #### org.jetbrains.intellij.platform.tasks @@ -86,7 +90,7 @@ It can be omitted when referring to any IntelliJ Platform SDK dependencies witho {id="plugin.settings"} -Settings plugin is required in settings.gradle.kts when using `RepositoryHandler` extensions when declaring the IntelliJ Maven repository (see [](intellij_artifacts.md)) for the `dependencyResolutionManagement` Gradle mechanism. +If you define repositories within the settings.gradle.kts using the `dependencyResolutionManagement` Gradle, make sure to include the Settings plugin in your settings.gradle.kts. ## Configuration @@ -94,7 +98,7 @@ Settings plugin is required in settings.gradle.kts when using `Repo > {title="Exploring Configuration Options"} -### Setting up repositories +### Setting Up Repositories {id="configuration.repositories"} @@ -102,9 +106,9 @@ All IntelliJ Platform SDK artifacts are available via IntelliJ Maven repositorie - releases - snapshots -- nightly (only select artifacts) +- nightly (only selected artifacts) -All required repositories for the project must be declared explicitly within the `intellijPlatform` extension: +Assume you want to build your plugin against a release version of the IntelliJ Platform and you also have a dependency on a plugin from the Marketplace, then you would declare the following repositories: ```kotlin repositories { @@ -112,8 +116,7 @@ repositories { intellijPlatform { releases() - snapshots() - nightly() + marketplace() } } ``` @@ -167,7 +170,7 @@ However, it is possible to use the direct repository URL, if available. To switch off the default usage of JetBrains Cache Redirector, see the [](tools_intellij_platform_gradle_plugin_build_features.md#useCacheRedirector) build feature. -### Setting up IntelliJ Platform +### Setting Up IntelliJ Platform Dependencies and [repositories](#configuration.repositories) are handled using explicit entries within `dependencies {}` and `repositories {}` blocks in build.gradle.kts file. @@ -208,7 +211,7 @@ Other IDEs can be targeted using one the extensions listed in the table below. | `rustRover` | Rust Rover | | `writerside` | Writerside | -#### Parametrized IntelliJ Platform dependency +#### Parametrize IntelliJ Platform Dependency As a fallback, `intellijPlatform` extension can be used to allow dynamic configuration of the target platform, e.g., via gradle.properties: @@ -244,7 +247,7 @@ dependencies { } ``` -#### Local IntelliJ Platform IDE instance +#### Local IntelliJ Platform IDE Instance It is possible to refer to the locally available IntelliJ-based IDE using the `local` helper function: @@ -265,7 +268,7 @@ dependencies { Note that the `ivy` entry needs to be added to the `repositories {}` block as all local dependencies (local IDE, bundled plugins, etc.) rely on the Ivy repositories. -### Setting up plugin dependencies +### Setting Up Plugin Dependencies TODO @@ -275,7 +278,7 @@ TODO ## Migration FAQ -### Unresolved 'idea' plugin +### Unresolved 'idea' Plugin Add an explicit dependency on the plugin in build.gradle.kts: diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index af51dea8c..cac4cfe49 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -233,13 +233,15 @@ intellijPlatform { productDescriptor { code.set("MY_CODE") releaseDate.set("20240217") - releaseVersion.set("") - optional.set("") + releaseVersion.set("20241") + optional.set(false) } } } ``` +See also: +- [How to add required parameters for paid plugins](https://plugins.jetbrains.com/docs/marketplace/add-required-parameters.html) ### code {#intellijPlatform-pluginConfiguration-productDescriptor-code} @@ -470,6 +472,7 @@ intellijPlatform { } ``` + ### host {#intellijPlatform-publishing-host} @@ -480,23 +483,51 @@ Type : `Property` See also: -- [Tasks: `patchPluginXml.vendorUrl`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin) +- [Tasks: `publishPlugin.host`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-host) + ### token {#intellijPlatform-publishing-token} +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `publishPlugin.token`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-token) + ### channel {#intellijPlatform-publishing-channel} +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `publishPlugin.channels`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-channels) +- ### toolboxEnterprise {#intellijPlatform-publishing-toolboxEnterprise} +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `publishPlugin.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-toolboxEnterprise) + ### hidden {#intellijPlatform-publishing-hidden} +{style="narrow"} +Type +: `Property` + +See also: +- [Tasks: `publishPlugin.hidden`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-hidden) ## Signing From 60b942121ebfab1781f2993e5762a7cd9e7305cb Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Wed, 31 Jan 2024 22:04:49 +0100 Subject: [PATCH 06/54] IntelliJ Platform Gradle Plugin: IntelliJPlatform.Publishing extension, PublishPluginTask --- ...tellij_platform_gradle_plugin_extension.md | 28 ++++- ...s_intellij_platform_gradle_plugin_tasks.md | 109 +++++++++++++++++- 2 files changed, 133 insertions(+), 4 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index cac4cfe49..a55aeefc5 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -482,6 +482,9 @@ The hostname used for publishing the plugin. Type : `Property` +Default value +: `"https://plugins.jetbrains.com"` + See also: - [Tasks: `publishPlugin.host`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-host) @@ -489,10 +492,15 @@ See also: ### token {#intellijPlatform-publishing-token} +Authorization token. + {style="narrow"} Type : `Property` +Required +: yes + See also: - [Tasks: `publishPlugin.token`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-token) @@ -500,21 +508,31 @@ See also: ### channel {#intellijPlatform-publishing-channel} +A channel name to upload plugin to. + {style="narrow"} Type : `Property` +Default value: +: `"default"` + See also: -- [Tasks: `publishPlugin.channels`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-channels) -- +- [Tasks: `publishPlugin.channel`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-channel) + ### toolboxEnterprise {#intellijPlatform-publishing-toolboxEnterprise} +Specifies if the Toolbox Enterprise plugin repository service should be used. + {style="narrow"} Type : `Property` +Default value +: `false` + See also: - [Tasks: `publishPlugin.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-toolboxEnterprise) @@ -522,12 +540,18 @@ See also: ### hidden {#intellijPlatform-publishing-hidden} +Publish the plugin update and mark it as hidden to prevent public release after approval. + {style="narrow"} Type : `Property` +Default value +: `false` + See also: - [Tasks: `publishPlugin.hidden`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-hidden) +- [Hidden release](https://plugins.jetbrains.com/docs/marketplace/hidden-plugin.html) ## Signing diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 64f5aa738..7d0657ad2 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -19,6 +19,10 @@ See also: ## classpathIndexCleanup {#classpathIndexCleanup} +> Deprecated? +> +{style="warning"} + ## initializeIntelliJPlatformPlugin {#initializeIntelliJPlatformPlugin} @@ -38,6 +42,10 @@ See also: ## instrumentedJar {#instrumentedJar} +> Not implemented. +> +{style="warning"} + ## jarSearchableOptions {#jarSearchableOptions} @@ -380,36 +388,125 @@ See also: ## publishPlugin {#publishPlugin} +The task for publishing plugin to the remote plugins repository, such as [JetBrains Marketplace](https://plugins.jetbrains.com). + +See also: +- [Uploading a Plugin to JetBrains Marketplace](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#uploading-a-plugin-to-jetbrains-marketplace) +- [Plugin upload API](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html) +- [Publishing Plugin With Gradle](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#publishing-plugin-with-gradle) + ### archiveFile {#publishPlugin-archiveFile} +ZIP archive to be published to the remote repository. + +By default, it uses an output `archiveFile` of the [`signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) task if plugin signing is configured, otherwise [`buildPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#buildPlugin). + +{style="narrow"} +Type +: `Property` + +Default value +: [`signPlugin.archiveFile`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-archiveFile) or [`buildPlugin.archiveFile`](tools_intellij_platform_gradle_plugin_tasks.md#buildPlugin-archiveFile) + +See also: +- [Extension: `intellijPlatform.signing`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing) +- [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) +- [Tasks: `buildPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#buildPlugin) + ### host {#publishPlugin-host} +URL host of a plugin repository. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.publishing.host`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-host) + +See also: +- [Extension `intellijPlatform.publishing.host`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-host) + ### token {#publishPlugin-token} +Authorization token. -### channels -{#publishPlugin-channels} +{style="narrow"} +Type +: `Property` + +Required +: yes + +Default value +: [`intellijPlatform.publishing.token`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-token) + +See also: +- [Extension: `intellijPlatform.publishing.token`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-token) + + +### channel +{#publishPlugin-channel} + +A channel name to upload plugin to. + +{style="narrow"} +Type +: `Property` + +Default value: +: [`intellijPlatform.publishing.channel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channel) + +See also: +- [Extension: `intellijPlatform.publishing.channel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channel) ### hidden {#publishPlugin-hidden} +Publish the plugin update and mark it as hidden to prevent public release after approval. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.publishing.hidden`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-hidden) + +See also: +- [Extension: `intellijPlatform.publishing.hidden`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-hidden) +- [Hidden release](https://plugins.jetbrains.com/docs/marketplace/hidden-plugin.html) + ### toolboxEnterprise {#publishPlugin-toolboxEnterprise} +Specifies if the Toolbox Enterprise plugin repository service should be used. +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.publishing.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-toolboxEnterprise) + +See also: +- [Extension: `intellijPlatform.publishing.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-toolboxEnterprise) ## runIdePerformanceTest {#runIdePerformanceTest} +> Not implemented. +> +{style="warning"} + ## runIde {#runIde} @@ -418,6 +515,10 @@ See also: ## setupDependencies {#setupDependencies} +> Deprecated. +> +{style="warning"} + ## signPlugin {#signPlugin} @@ -430,6 +531,10 @@ See also: ## testIdeUi {#testIdeUi} +> Not implemented. +> +{style="warning"} + ## verifyPluginProjectConfiguration {#verifyPluginProjectConfiguration} From e4af60d126953bf0462d385156244e6c867af445 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 1 Feb 2024 14:47:33 +0100 Subject: [PATCH 07/54] IntelliJ Platform Gradle Plugin: IntelliJPlatform.Signing extension, SignPluginTask --- ...tellij_platform_gradle_plugin_extension.md | 128 ++++++++++ ...s_intellij_platform_gradle_plugin_tasks.md | 220 +++++++++++++++++- 2 files changed, 346 insertions(+), 2 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index a55aeefc5..72704de7c 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -557,6 +557,134 @@ See also: ## Signing {#intellijPlatform-signing} +Plugin signing configuration. + +See also: +- [](plugin_signing.md) +- [Task Awares: `SigningAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SigningAware) +- [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) + +### cliPath +{#intellijPlatform-signing-cliPath} + +A path to the local Marketplace ZIP Signer CLI tool to be used. + +{style="narrow"} +Type +: `RegularFileProperty` + + +### keyStore +{#intellijPlatform-signing-keyStore} + +KeyStore file path. +Refers to `ks` CLI option. + +{style="narrow"} +Type +: `Property` + + +### keyStorePassword +{#intellijPlatform-signing-keyStorePassword} + +KeyStore password. +Refers to `ks-pass` CLI option. + +{style="narrow"} +Type +: `Property` + + +### keyStoreKeyAlias +{#intellijPlatform-signing-keyStoreKeyAlias} + +KeyStore key alias. +Refers to `ks-key-alias` CLI option. + +{style="narrow"} +Type +: `Property` + + +### keyStoreType +{#intellijPlatform-signing-keyStoreType} + +KeyStore type. +Refers to `ks-type` CLI option. + +{style="narrow"} +Type +: `Property` + + +### keyStoreProviderName +{#intellijPlatform-signing-keyStoreProviderName} + +JCA KeyStore Provider name. +Refers to `ks-provider-name` CLI option. + +{style="narrow"} +Type +: `Property` + + +### privateKey +{#intellijPlatform-signing-privateKey} + +Encoded private key in the PEM format. +Refers to `key` CLI option. + +{style="narrow"} +Type +: `Property` + + +### privateKeyFile +{#intellijPlatform-signing-privateKeyFile} + +A file with an encoded private key in the PEM format. +Refers to `key-file` CLI option. + +{style="narrow"} +Type +: `RegularFileProperty` + + +### password +{#intellijPlatform-signing-password} + +Password required to decrypt the private key. +Refers to `key-pass` CLI option. + +{style="narrow"} +Type +: `Property` + + +### certificateChain +{#intellijPlatform-signing-certificateChain} + +A string containing X509 certificates. +The first certificate from the chain will be used as a certificate authority (CA). +Refers to `cert` CLI option. + +{style="narrow"} +Type +: `Property` + + +### certificateChainFile +{#intellijPlatform-signing-certificateChainFile} + +Path to the file containing X509 certificates. +The first certificate from the chain will be used as a certificate authority (CA). +Refers to `cert-file` CLI option. + +{style="narrow"} +Type +: `RegularFileProperty` + ## Verify Plugin {#intellijPlatform-verifyPlugin} diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 7d0657ad2..0cd525d1f 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -66,7 +66,7 @@ By default, a plugin.xml file is picked from the main resource loca Type : `RegularFileProperty` -Default value: +Default value : src/main//resources/META-INF/plugin.xml @@ -460,7 +460,7 @@ A channel name to upload plugin to. Type : `Property` -Default value: +Default value : [`intellijPlatform.publishing.channel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channel) See also: @@ -523,6 +523,222 @@ See also: ## signPlugin {#signPlugin} +Signs the ZIP archive with the provided key using [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) library. + +To sign the plugin before publishing to [JetBrains Marketplace](https://plugins.jetbrains.com) with the [SignPluginTask] task, it is required to provide a certificate chain and a private key with its password using `signPlugin { ... }` Plugin Signing DSL. + +As soon as [privateKey] (or [privateKeyFile]) and [certificateChain] (or [certificateChainFile]) properties are specified, the task will be executed automatically right before the [PublishPluginTask] task. + +For more details, see [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html) article. + + +### archiveFile +{#signPlugin-archiveFile} + +Input, unsigned ZIP archive file. +Refers to `in` CLI option. + +By default, it uses the output archive of the [`buildPlugin`](#buildPlugin) task. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`buildPlugin.archiveFile`](#buildPlugin-archiveFile) + +See also: +- [Tasks: `buildPlugin.archiveFile`](#buildPlugin-archiveFile) + + +### signedArchiveFile +{#signPlugin-signedArchiveFile} + +Output, signed ZIP archive file. +Refers to `out` CLI option. + +Predefined with the name of the ZIP archive file with `-signed` name suffix attached. +The output file is placed next to the input [`archiveFile`](#signPlugin-archiveFile). + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`signPlugin.archiveFile`](#signPlugin-archiveFile) with `-signed` suffix applied to the name + + +### keyStore +{#signPlugin-keyStore} + +KeyStore file path. +Refers to `ks` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.keyStore`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStore) + +See also: +- [Extension: `intellijPlatform.signing.keyStore`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStore) + + +### keyStorePassword +{#signPlugin-keyStorePassword} + +KeyStore password. +Refers to `ks-pass` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.keyStorePassword`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStorePassword) + +See also: +- [Extension: `intellijPlatform.signing.keyStorePassword`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStorePassword) + + +### keyStoreKeyAlias +{#signPlugin-keyStoreKeyAlias} + +KeyStore key alias. +Refers to `ks-key-alias` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.keyStoreKeyAlias`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreKeyAlias) + +See also: +- [Extension: `intellijPlatform.signing.keyStoreKeyAlias`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreKeyAlias) + + +### keyStoreType +{#signPlugin-keyStoreType} + +KeyStore type. +Refers to `ks-type` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.keyStoreType`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreType) + +See also: +- [Extension: `intellijPlatform.signing.keyStoreType`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreType) + + +### keyStoreProviderName +{#signPlugin-keyStoreProviderName} + +JCA KeyStore Provider name. +Refers to `ks-provider-name` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.keyStoreProviderName`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreProviderName) + +See also: +- [Extension: `intellijPlatform.signing.keyStoreProviderName`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreProviderName) + + +### privateKey +{#signPlugin-privateKey} + +Encoded private key in the PEM format. +Refers to `key` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.privateKey`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKey) + +See also: +- [Extension: `intellijPlatform.signing.privateKey`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKey) + + +### privateKeyFile +{#signPlugin-privateKeyFile} + +A file with an encoded private key in the PEM format. +Refers to `key-file` CLI option. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`intellijPlatform.signing.privateKeyFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKeyFile) + +See also: +- [Extension: `intellijPlatform.signing.privateKeyFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKeyFile) + + +### password +{#signPlugin-password} + +Password required to decrypt the private key. +Refers to `key-pass` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.password`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-password) + +See also: +- [Extension: `intellijPlatform.signing.password`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-password) + + +### certificateChain +{#signPlugin-certificateChain} + +A string containing X509 certificates. +The first certificate from the chain will be used as a certificate authority (CA). +Refers to `cert` CLI option. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.signing.certificateChain`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChain) + +See also: +- [Extension: `intellijPlatform.signing.certificateChain`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChain) + + +### certificateChainFile +{#signPlugin-certificateChainFile} + +Path to the file containing X509 certificates. +The first certificate from the chain will be used as a certificate authority (CA). +Refers to `cert-file` CLI option. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`intellijPlatform.signing.certificateChainFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChainFile) + +See also: +- [Extension: `intellijPlatform.signing.certificateChainFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChainFile) + ## testIde {#testIde} From 08e77f11ba3a1b0829e797a49a91086f3b0f0fe5 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 5 Feb 2024 16:57:01 +0100 Subject: [PATCH 08/54] IntelliJ Platform Gradle Plugin --- .idea/kotlinScripting.xml | 9 - ijs.tree | 1 + .../tools_intellij_platform_gradle_plugin.md | 10 +- ...j_platform_gradle_plugin_build_features.md | 6 +- ...rm_gradle_plugin_dependencies_extension.md | 63 +++ ...tellij_platform_gradle_plugin_extension.md | 375 ++++++++++++++-- ...llij_platform_gradle_plugin_task_awares.md | 248 ++++++++++ ...s_intellij_platform_gradle_plugin_tasks.md | 422 +++++++++++++++--- ...s_intellij_platform_gradle_plugin_types.md | 189 ++++++++ 9 files changed, 1206 insertions(+), 117 deletions(-) delete mode 100644 .idea/kotlinScripting.xml create mode 100644 topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md diff --git a/.idea/kotlinScripting.xml b/.idea/kotlinScripting.xml deleted file mode 100644 index cdb3091f1..000000000 --- a/.idea/kotlinScripting.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 2147483647 - true - - - \ No newline at end of file diff --git a/ijs.tree b/ijs.tree index 376d2c33c..fad94e342 100644 --- a/ijs.tree +++ b/ijs.tree @@ -412,6 +412,7 @@ + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 4d742a2ee..b8c3e7413 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -90,7 +90,7 @@ It can be omitted when referring to any IntelliJ Platform SDK dependencies witho {id="plugin.settings"} -If you define repositories within the settings.gradle.kts using the `dependencyResolutionManagement` Gradle, make sure to include the Settings plugin in your settings.gradle.kts. +If you define repositories within the settings.gradle.kts using the `dependencyResolutionManagement` Gradle, make sure to include the Settings plugin in your settings.gradle.kts. ## Configuration @@ -228,21 +228,21 @@ dependencies { val type = providers.gradleProperty("platformType") val version = providers.gradleProperty("platformVersion") - intellijPlatform(type, version) + create(type, version) } } ``` -The `intellijPlatform` helper accepts also the `IntelliJPlatformType` enum type: +The `intellijPlatform` helper accepts also the [`IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) type: ```kotlin -import org.jetbrains.intellij.platform.gradle.utils.IntelliJPlatformType +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType dependencies { intellijPlatform { val version = providers.gradleProperty("platformVersion") - intellijPlatform(IntelliJPlatformType.IntellijIdeaUltimate, version) + create(IntelliJPlatformType.IntellijIdeaUltimate, version) } } ``` diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md index d65fe0767..ca9c2a75f 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md @@ -34,10 +34,6 @@ Example org.jetbrains.intellij.buildFeature.buildSearchableOptions=false ``` -See also: -- [Tasks: buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) -- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) - ## paidPluginSearchableOptionsWarning {#paidPluginSearchableOptionsWarning} @@ -62,7 +58,7 @@ org.jetbrains.intellij.platform.buildFeature.paidPluginSearchableOptionsWarning= Checks whether the currently used Gradle IntelliJ Plugin is outdated and if a new release is available. The plugin performs an update check on every run asking the GitHub Releases page for the redirection URL -to the latest version with `HEAD` HTTP request: `https://github.com/jetbrains/gradle-intellij-plugin/releases/latest`. +to the latest version with `HEAD` HTTP request: [](https://github.com/jetbrains/gradle-intellij-plugin/releases/latest). If the current version is outdated, the plugin will emit a warning with its current and the latest version. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md index 23b1c81b6..840d1c8d2 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -4,5 +4,68 @@ IntelliJ Platform Gradle Plugin dependencies extension. +Extension class for managing IntelliJ Platform dependencies in a Gradle build script applied to the `DependencyHandler`. + +This class provides methods for adding dependencies to different IntelliJ Platform products and managing local dependencies. + +It also includes methods for adding JetBrains Runtime, IntelliJ Platform plugins, IntelliJ Platform bundled plugins, IntelliJ Plugin Verifier, and Marketplace ZIP Signer. + +**Example:** + +```kotlin +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType + +dependencies { + // ... + + intellijPlatform { + // ... + + create(IntelliJPlatformType.PhpStorm, "2023.3") + create("PS", "2023.3") + intellijIdeaCommunity("2023.3") + local(file("/path/to/ide/")) + jetbrainsRuntime("...") + plugin("org.intellij.scala") + bundledPlugin("com.intellij.java") + pluginVerifier() + zipSigner() + } +} +``` + +> Just one IntelliJ Platform dependency can be added to the project at the time. +> +{style="warning"} + +| Function | Description | +|----------------------------------------------------------------------------------------|----------------------------------------------------------------| +| `create(type, version)` | Adds a dependency on the IntelliJ Platform. | +| `androidStudio(version)` | Adds a dependency on Android Studio. | +| `clion(version)` | Adds a dependency on CLion. | +| `fleetBackend(version)` | Adds a dependency on Fleet Backend. | +| `gateway(version)` | Adds a dependency on Gateway. | +| `goland(version)` | Adds a dependency on GoLand. | +| `intellijIdeaCommunity(version)` | Adds a dependency on IntelliJ IDEA Community. | +| `intellijIdeaUltimate(version)` | Adds a dependency on IntelliJ IDEA Ultimate. | +| `phpstorm(version)` | Adds a dependency on PhpStorm. | +| `pycharmCommunity(version)` | Adds a dependency on PyCharm Community. | +| `pycharmProfessional(version)` | Adds a dependency on PyCharm Professional. | +| `rider(version)` | Adds a dependency on Rider. | +| `rustRover(version)` | Adds a dependency on Rust Rover. | +| `writerside(version)` | Adds a dependency on Writerside. | +| `local(localPath)` | Adds a local dependency on a local IntelliJ Platform instance. | +| `jetbrainsRuntime(version, variant, architecture)` `jetbrainsRuntime(explicitVersion)` | Adds a dependency on JetBrains Runtime. | +| `plugin(id, version, channel)` | Adds a dependency on a plugin for IntelliJ Platform. | +| `bundledPlugin(id)` | Adds a dependency on a bundled IntelliJ Platform plugin. | +| `pluginVerifier(version)` | Adds a dependency on IntelliJ Plugin Verifier. | +| `zipSigner(version)` | Adds a dependency on Marketplace ZIP Signer. | + +See also: +- [](verifying_plugin_compatibility.md) +- [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) +- [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) +- [Types: `IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index 72704de7c..600664d5e 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -7,6 +7,7 @@ The _IntelliJ Platform Gradle Plugin_ introduces a top-level `intellijPlatform` extension. It consists of sections dedicated to the general Gradle plugin configuration, plugin.xml definition, publishing, signing, and verifying of the output plugin for IntelliJ-based IDEs. + ## IntelliJ Platform {#intellijPlatform} @@ -20,13 +21,22 @@ intellijPlatform { buildSearchableOptions.set(true) sandboxContainer.set("...") - pluginConfiguration { ... } - publishing { ... } - signing { ... } - verifyPlugin { ... } + pluginConfiguration { + // ... + } + publishing { + // ... + } + signing { + // ... + } + verifyPlugin { + // ... + } } ``` + ### instrumentCode {#intellijPlatform-instrumentCode} @@ -39,7 +49,7 @@ The compiled code will be enhanced with: - nullability assertions - post-processing of forms created by IntelliJ GUI Designer -Controls the execution of the [](tools_intellij_platform_gradle_plugin_tasks.md#instrumentCode) task. +Controls the execution of the [`instrumentCode`](tools_intellij_platform_gradle_plugin_tasks.md#instrumentCode) task. {style="narrow"} Type @@ -48,15 +58,12 @@ Type Default value : `true` -See also: -- [Tasks: `instrumentCode`](tools_intellij_platform_gradle_plugin_tasks.md#instrumentCode) - ### buildSearchableOptions {#intellijPlatform-buildSearchableOptions} Builds an index of UI components (searchable options) for the plugin. -Controls the execution of the [](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) task. +Controls the execution of the [`buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) task. {style="narrow"} Type @@ -66,7 +73,6 @@ Default value : `true` See also: -- [Tasks: `buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) - [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) @@ -80,7 +86,7 @@ Type : `DirectoryProperty` Default value -: build/ +: [buildDirectory]/[Sandbox.CONTAINER] See also: - [Tasks: `prepareSandbox`](tools_intellij_platform_gradle_plugin_tasks.md#prepareSandbox) @@ -91,13 +97,13 @@ See also: {#intellijPlatform-pluginConfiguration} Configures the plugin definition and stores in the `plugin.xml` file. -Data provided to the `intellijPlatform.pluginConfiguration {}` extension is passed to the [](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml) task, which overrides the plugin.xml file with new values. +Data provided to the `intellijPlatform.pluginConfiguration {}` extension is passed to the [`patchPluginXml`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml) task, which overrides the plugin.xml file with new values. **Example:** ```kotlin intellijPlatform { - ... + // ... pluginConfiguration { id.set("my-plugin-id") @@ -110,9 +116,15 @@ intellijPlatform { """.trimIndent() ) - productDescriptor { ... } - ideaVersion { ... } - vendor { ... } + productDescriptor { + // ... + } + ideaVersion { + // ... + } + vendor { + // ... + } } } ``` @@ -130,7 +142,7 @@ The plugin's unique identifier. This should mirror the structure of fully qualified Java packages and must remain distinct from the IDs of existing plugins. This ID is a technical descriptor used not only within the IDE, but also on [JetBrains Marketplace](https://plugins.jetbrains.com/). -Please restrict input to characters, numbers, and `.`/`-`/`_` symbols , and aim for a concise length. +Please restrict input to characters, numbers, and `.`/`-`/`_` symbols, and aim for a concise length. The entered value will populate the `` element. @@ -166,7 +178,7 @@ The plugin version, presented in the Plugins settings dialog and on its JetBrain For plugins uploaded to the JetBrains Marketplace, semantic versioning must be adhered to. -The specified value will be used as an `` element. +The specified value will be used as a `` element. {style="narrow"} Type @@ -225,10 +237,10 @@ A part of the [](#intellijPlatform-pluginConfiguration) which describes the `pro ```kotlin intellijPlatform { - ... + // ... pluginConfiguration { - ... + // ... productDescriptor { code.set("MY_CODE") @@ -243,6 +255,7 @@ intellijPlatform { See also: - [How to add required parameters for paid plugins](https://plugins.jetbrains.com/docs/marketplace/add-required-parameters.html) + ### code {#intellijPlatform-pluginConfiguration-productDescriptor-code} @@ -321,10 +334,10 @@ A part of the [](#intellijPlatform-pluginConfiguration) which describes the `ide ```kotlin intellijPlatform { - ... + // ... pluginConfiguration { - ... + // ... ideaVersion { sinceBuild.set("241") @@ -334,6 +347,7 @@ intellijPlatform { } ``` + ### sinceBuild {#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild} @@ -387,10 +401,10 @@ A part of the [](#intellijPlatform-pluginConfiguration) which describes the `ven ```kotlin intellijPlatform { - ... + // ... pluginConfiguration { - ... + // ... vendor { name.set("JetBrains") @@ -460,7 +474,7 @@ All values are passed to the [](tools_intellij_platform_gradle_plugin_tasks.md#p ```kotlin intellijPlatform { - ... + // ... publishing { host.set("") @@ -559,11 +573,35 @@ See also: Plugin signing configuration. +**Example:** + +```kotlin +intellijPlatform { + // ... + + signing { + cliPath.set(file("/path/to/marketplace-zip-signer-cli.jar")) + keyStore.set(file("/path/to/keyStore.ks")) + keyStorePassword.set("...") + keyStoreKeyAlias.set("...") + keyStoreType.set("...") + keyStoreProviderName.set("...") + privateKey.set("...") + privateKeyFile.set(file("/path/to/private.pem")) + password.set("...") + certificateChain.set("...") + certificateChainFile.set(file("/path/to/chain.crt")) + } +} +``` + See also: - [](plugin_signing.md) +- [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) - [Task Awares: `SigningAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SigningAware) - [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) + ### cliPath {#intellijPlatform-signing-cliPath} @@ -573,6 +611,9 @@ A path to the local Marketplace ZIP Signer CLI tool to be used. Type : `RegularFileProperty` +See also: +- [Task Awares: `SigningAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SigningAware) + ### keyStore {#intellijPlatform-signing-keyStore} @@ -584,6 +625,9 @@ Refers to `ks` CLI option. Type : `Property` +See also: +- [Tasks: `signPlugin.keyStore`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-keyStore) + ### keyStorePassword {#intellijPlatform-signing-keyStorePassword} @@ -595,6 +639,9 @@ Refers to `ks-pass` CLI option. Type : `Property` +See also: +- [Tasks: `signPlugin.keyStorePassword`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-keyStorePassword) + ### keyStoreKeyAlias {#intellijPlatform-signing-keyStoreKeyAlias} @@ -606,6 +653,9 @@ Refers to `ks-key-alias` CLI option. Type : `Property` +See also: +- [Tasks: `signPlugin.keyStoreKeyAlias`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-keyStoreKeyAlias) + ### keyStoreType {#intellijPlatform-signing-keyStoreType} @@ -617,6 +667,9 @@ Refers to `ks-type` CLI option. Type : `Property` +See also: +- [Tasks: `signPlugin.keyStoreType`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-keyStoreType) + ### keyStoreProviderName {#intellijPlatform-signing-keyStoreProviderName} @@ -628,6 +681,9 @@ Refers to `ks-provider-name` CLI option. Type : `Property` +See also: +- [Tasks: `signPlugin.keyStoreProviderName`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-keyStoreProviderName) + ### privateKey {#intellijPlatform-signing-privateKey} @@ -635,10 +691,15 @@ Type Encoded private key in the PEM format. Refers to `key` CLI option. +Takes precedence over the [](#intellijPlatform-signing-privateKeyFile) property. + {style="narrow"} Type : `Property` +See also: +- [Tasks: `signPlugin.privateKey`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-privateKey) + ### privateKeyFile {#intellijPlatform-signing-privateKeyFile} @@ -650,6 +711,9 @@ Refers to `key-file` CLI option. Type : `RegularFileProperty` +See also: +- [Tasks: `signPlugin.privateKeyFile`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-privateKeyFile) + ### password {#intellijPlatform-signing-password} @@ -661,6 +725,9 @@ Refers to `key-pass` CLI option. Type : `Property` +See also: +- [Tasks: `signPlugin.password`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-password) + ### certificateChain {#intellijPlatform-signing-certificateChain} @@ -669,10 +736,15 @@ A string containing X509 certificates. The first certificate from the chain will be used as a certificate authority (CA). Refers to `cert` CLI option. +Takes precedence over the [](#intellijPlatform-signing-certificateChainFile) property. + {style="narrow"} Type : `Property` +See also: +- [Tasks: `signPlugin.certificateChain`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-certificateChain) + ### certificateChainFile {#intellijPlatform-signing-certificateChainFile} @@ -685,9 +757,262 @@ Refers to `cert-file` CLI option. Type : `RegularFileProperty` +See also: +- [Tasks: `signPlugin.certificateChainFile`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-certificateChainFile) + ## Verify Plugin {#intellijPlatform-verifyPlugin} +IntelliJ Plugin Verifier CLI tool configuration. + +**Example:** + +```kotlin +intellijPlatform { + // ... + + verifyPlugin { + cliPath.set(file("/path/to/plugin-verifier-cli.jar")) + freeArgs.set(listOf("foo", "bar")) + homeDirectory.set(file("/path/to/pluginVerifierHomeDirectory/")) + downloadDirectory.set(file("/path/to/pluginVerifierHomeDirectory/ides/")) + failureLevel.set(VerifyPluginTask.FailureLevel.ALL) + verificationReportsDirectory.set("build/reports/pluginVerifier") + verificationReportsFormats.set(VerifyPluginTask.VerificationReportsFormats.ALL) + externalPrefixes.set("com.example") + teamCityOutputFormat.set(false) + subsystemsToCheck.set(VerifyPluginTask.Subsystems.ALL) + ignoredProblemsFile.set(file("/path/to/ignoredProblems.txt")) + + ides { + // ... + } + } +} +``` + +See also: +- [](verifying_plugin_compatibility.md) +- [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) +- [Task Awares: `PluginVerifierAware`](tools_intellij_platform_gradle_plugin_task_awares.md#PluginVerifierAware) +- [](#intellijPlatform-verifyPlugin-ides) +- [IntelliJ Plugin Verifier CLI](https://github.com/JetBrains/intellij-plugin-verifier) + + +### cliPath +{#intellijPlatform-verifyPlugin-cliPath} + +A path to the local IntelliJ Plugin Verifier CLI tool to be used. + +{style="narrow"} +Type +: `RegularFileProperty` + +See also: +- [Task Awares: `PluginVerifierAware`](tools_intellij_platform_gradle_plugin_task_awares.md#PluginVerifierAware) + + +### downloadDirectory +{#intellijPlatform-verifyPlugin-downloadDirectory} + +The path to the directory where IDEs used for the verification will be downloaded. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [`homeDirectory`](#intellijPlatform-verifyPlugin-homeDirectory)/ides + + +### failureLevel +{#intellijPlatform-verifyPlugin-failureLevel} + +Defines the verification level at which the task should fail if any reported issue matches. + +{style="narrow"} +Type +: `ListProperty` + +Default value +: [`FailureLevel.COMPATIBILITY_PROBLEMS`](tools_intellij_platform_gradle_plugin_types.md#FailureLevel) + +See also: +- [Tasks: `verifyPlugin.failureLevel`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-failureLevel) + + +### externalPrefixes +{#intellijPlatform-verifyPlugin-externalPrefixes} + +The list of class prefixes from the external libraries. +The Plugin Verifier will not report `No such class` for classes of these packages. + +{style="narrow"} +Type +: `ListProperty` + +See also: +- [Tasks: `verifyPlugin.externalPrefixes`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-externalPrefixes) + + +### freeArgs +{#intellijPlatform-verifyPlugin-freeArgs} + +The list of free arguments is passed directly to the IntelliJ Plugin Verifier CLI tool. + +They can be used in addition to the arguments that are provided by dedicated options. + +{style="narrow"} +Type +: `ListProperty` + +See also: +- [Tasks: `verifyPlugin.freeArgs`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-freeArgs) + + +### homeDirectory +{#intellijPlatform-verifyPlugin-homeDirectory} + +Retrieve the Plugin Verifier home directory used for storing downloaded IDEs. +Following home directory resolving method is taken directly from the Plugin Verifier to keep the compatibility. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: - Directory specified with `plugin.verifier.home.dir` system property + - Directory specified with `XDG_CACHE_HOME` environment variable + - ~/.cache/pluginVerifier + - [buildDirectory]/tmp/pluginVerifier + + +### ignoredProblemsFile +{#intellijPlatform-verifyPlugin-ignoredProblemsFile} + +A file that contains a list of problems that will be ignored in a report. + +{style="narrow"} +Type +: `RegularFileProperty` + +See also: +- [Tasks: `verifyPlugin.ignoredProblemsFile`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-ignoredProblemsFile) + + +### subsystemsToCheck +{#intellijPlatform-verifyPlugin-subsystemsToCheck} + +Specifies which subsystems of IDE should be checked. + +{style="narrow"} +Type +: `Subsystems` + +Default value +: [`Subsystems.ALL`](tools_intellij_platform_gradle_plugin_types.md#Subsystems) + +See also: +- [Tasks: `verifyPlugin.subsystemsToCheck`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-subsystemsToCheck) + + +### teamCityOutputFormat +{#intellijPlatform-verifyPlugin-teamCityOutputFormat} + +A flag that controls the output format. +If set to `true`, the TeamCity compatible output will be returned to stdout. + +{style="narrow"} +Type +: `Property` + +Default value +: `false` + +See also: +- [Tasks: `verifyPlugin.teamCityOutputFormat`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-teamCityOutputFormat) + + +### verificationReportsDirectory +{#intellijPlatform-verifyPlugin-verificationReportsDirectory} + +The path to the directory where verification reports will be saved. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [buildDirectory]/reports/pluginVerifier + +See also: +- [Tasks: `verifyPlugin.verificationReportsDirectory`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-verificationReportsDirectory) + + +### verificationReportsFormats +{#intellijPlatform-verifyPlugin-verificationReportsFormats} + +The output formats of the verification reports. + +{style="narrow"} +Type +: `ListProperty` + +Default value +: [`VerificationReportsFormats.PLAIN`](tools_intellij_platform_gradle_plugin_types.md#VerificationReportsFormats), [`FailureVerificationReportsFormats`](tools_intellij_platform_gradle_plugin_types.md#VerificationReportsFormats) + +See also: +- [Tasks: `verifyPlugin.verificationReportsFormats`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-verificationReportsFormats) + + +## Verify Plugin IDEs +{#intellijPlatform-verifyPlugin-ides} + +The extension to define the IDEs to be used along with the IntelliJ Plugin Verifier CLI tool for the binary plugin verification. + +It provides a set of helpers which add relevant entries to the configuration, which later is used to resolve IntelliJ-based IDE binary releases. + +**Example:** + +```kotlin +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType + +intellijPlatform { + // ... + + verifyPlugin { + // ... + + ides { + ide(IntelliJPlatformType.PhpStorm) + ide(IntelliJPlatformType.RustRover, "2023.3") + localIde(file("/path/to/ide/")) + recommended() + select { + types = listOf(IntelliJPlatformType.PhpStorm) + channels = listOf(ProductRelease.Channel.RELEASE) + sinceBuild = "232" + untilBuild = "241.*" + } + } + } +} +``` + +See also: +- [](verifying_plugin_compatibility.md) +- [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) +- [Types: `IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) +- [Types: `ProductRelease.Channel`](tools_intellij_platform_gradle_plugin_types.md#ProductRelease-Channel) +- [Types: `ProductReleasesValueSource.FilterParameters`](tools_intellij_platform_gradle_plugin_types.md#ProductReleasesValueSource-FilterParameters) + +| Function | Description | +|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `ide(type, version)` `ide(definition)` | Adds a dependency to a binary IDE release to be used for testing with the IntelliJ Plugin Verifier. | +| `localIde(localPath)` | Adds the local IDE to be used for testing with the IntelliJ Plugin Verifier. | +| `recommended()` | Retrieves matching IDEs using the default configuration based on the currently used IntelliJ Platform and applies them for IntelliJ Platform Verifier using the `ide` helper method. | +| `select(configure)` | Retrieves matching IDEs using custom [`ProductReleasesValueSource.FilterParameters`](tools_intellij_platform_gradle_plugin_types.md#ProductReleasesValueSource-FilterParameters) filter parameters. | + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md index 303fa26cc..7ba3b0cc2 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -4,36 +4,284 @@ IntelliJ Platform Gradle Plugin task `*Aware` interfaces. +The Task Awares is a set of interfaces that can be applied to custom Gradle tasks and, when registered using the dedicated register method, inject new features or properties with predefined values. + + ## CoroutinesJavaAgentAware {#CoroutinesJavaAgentAware} +The interface provides the path to the Java Agent file for the Coroutines library required to enable coroutines debugging. + +Inherited also by [`RunnableIdeAware`](#RunnableIdeAware). + +### coroutinesJavaAgentFile +{#CoroutinesJavaAgentAware-coroutinesJavaAgentFile} + +The path to the coroutines Java Agent file. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`initializeIntellijPlatformPlugin.coroutinesJavaAgent`](tools_intellij_platform_gradle_plugin_tasks.md#initializeIntelliJPlatformPlugin-coroutinesJavaAgent) + ## CustomIntelliJPlatformVersionAware {#CustomIntelliJPlatformVersionAware} +By default, the project with the IntelliJ Platform Gradle Plugin applied required the presence of the IntelliJ Platform, referred to later by various tasks, configurations, and extensions. + +The custom IntelliJ Platform concept allows using another version, i.e., to run a guest IDE or tests against it. + +When applying this interface to the task, custom configurations to hold new dependencies defined by [`type`](#CustomIntelliJPlatformVersionAware-type) and [`version`](#CustomIntelliJPlatformVersionAware-version) (or [`localPath`](#CustomIntelliJPlatformVersionAware-localPath), if referring to the local IntelliJ Platform instance) are created, as well as a dedicated [`prepareSandbox`](tools_intellij_platform_gradle_plugin_tasks.md#prepareSandbox) task. + +Configurations, as well as the task preparing sandbox for running and testing the custom IntelliJ Platform (if required), have a random suffix applied to avoid collisions. + + +### type +{#CustomIntelliJPlatformVersionAware-type} + +An input property to configure the type of the custom IntelliJ Platform. + +By default, it refers to the IntelliJ Platform type used by the current project. + +{style="narrow"} +Type +: [`IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) + + +### version +{#CustomIntelliJPlatformVersionAware-version} + +An input property to configure the version of the custom IntelliJ Platform. + +By default, it refers to the IntelliJ Platform version used by the current project. + +{style="narrow"} +Type +: `Property` + + +### localPath +{#CustomIntelliJPlatformVersionAware-localPath} + +An input property to define the path to the local IntelliJ Platform instance to configure the version of the custom IntelliJ Platform. + +The local path precedes the IntelliJ Platform resolution using the [`type`](#CustomIntelliJPlatformVersionAware-type) and [`version`](#CustomIntelliJPlatformVersionAware-version) properties. + +{style="narrow"} +Type +: `DirectoryProperty` + ## IntelliJPlatformVersionAware {#IntelliJPlatformVersionAware} +This interface provides tasks a possibility for accessing information about the IntelliJ Platform currently used in the project. + +The [`intelliJPlatformConfiguration`](#IntelliJPlatformVersionAware-intelliJPlatformConfiguration) input property receives a dependency added to the `intellijPlatform` configuration, which eventually is resolved and lets to access the IntelliJ Platform details such as [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) or the path to the IntelliJ Platform directory. + +It is required to have a dependency on the IntelliJ Platform added to the project with helpers available in [](tools_intellij_platform_gradle_plugin_dependencies_extension.md). + + +### intelliJPlatformConfiguration +{#IntelliJPlatformVersionAware-intelliJPlatformConfiguration} + +Holds the `intellijPlatform` configuration with the IntelliJ Platform dependency added. + +It should not be directly accessed. + +{style="narrow"} +Type +: `ConfigurableFileCollection` + + +### platformPath +{#IntelliJPlatformVersionAware-platformPath} + +Provides a direct path to the IntelliJ Platform dependency artifact. + +{style="narrow"} +Type +: `Path` + +### productInfo +{#IntelliJPlatformVersionAware-productInfo} + +Provides information about the IntelliJ Platform product. + +The information is retrieved from the product-info.json file in the IntelliJ Platform directory. + +{style="narrow"} +Type +: [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) + + +### assertIntelliJPlatformSupportedVersion() +{#IntelliJPlatformVersionAware-assertIntelliJPlatformSupportedVersion} + +Asserts that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version. + +Invokes [`ProductInfo.assertSupportedVersion()`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo-assertSupportedVersion). + +{style="narrow"} +Throws +: `IllegalArgumentException` + ## PluginVerifierAware {#PluginVerifierAware} +The interface provides the path to the IntelliJ Plugin Verifier executable. + +It is required to have a dependency on the IntelliJ Plugin Verifier added to the project with [`intellijPlatform.pluginVerifier()`](tools_intellij_platform_gradle_plugin_dependencies_extension.md) dependencies extension. + + +### pluginVerifierExecutable +{#PluginVerifierAware-pluginVerifierExecutable} + +Path to the IntelliJ Plugin Verifier executable. + +{style="narrow"} +Type +: `RegularFileProperty` + ## RunnableIdeAware {#RunnableIdeAware} +The interface which utilizes a set of various interfaces required for running a guest IDE. Inherits from: +- [`CoroutinesJavaAgentAware`](#CoroutinesJavaAgentAware) +- [`RuntimeAware`](#RuntimeAware) +- [`SandboxAware`](#SandboxAware) +- `JavaForkOptions` + ## RuntimeAware {#RuntimeAware} +This interface provides access to the Java Runtime (i.e., JetBrains Runtime) resolved with `RuntimeResolver`. + +### runtimeDirectory +{#RuntimeAware-runtimeDirectory} + +Java Runtime parent directory. + +{style="narrow"} +Type +: `DirectoryProperty` + + +### runtimeExecutable +{#RuntimeAware-runtimeExecutable} + +Path to the Java Runtime executable. + +{style="narrow"} +Type +: `RegularFileProperty` + + +### runtimeArch +{#RuntimeAware-runtimeArch} + +An architecture of the Java Runtime currently used for running Gradle. + +{style="narrow"} +Type +: `Property` + + ## SandboxAware {#SandboxAware} +The interface provides quick access to the sandbox container and specific directories located within it. + +The path to the sandbox container is obtained using the [`intellijPlatform.sandboxContainer`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-sandboxContainer) extension property and the type and version of the IntelliJ Platform applied to the project. + +Paths respect custom IntelliJ Platform when combined with [`CustomIntelliJPlatformVersionAware`](#CustomIntelliJPlatformVersionAware). + + +### sandboxSuffix +{#SandboxAware-sandboxSuffix} + +Represents the suffix used i.e., for test-related tasks. + +{style="narrow"} +Type +: `Property` + + +### sandboxContainerDirectory +{#SandboxAware-sandboxContainerDirectory} + +The container for all sandbox-related directories. + +The directory name depends on the platform type and version currently used for running a task. + +{style="narrow"} +Type +: `DirectoryProperty` + + +### sandboxConfigDirectory +{#SandboxAware-sandboxConfigDirectory} + +A configuration directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory). + +{style="narrow"} +Type +: `DirectoryProperty` + + +### sandboxPluginsDirectory +{#SandboxAware-sandboxPluginsDirectory} + +A plugins directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory). + +{style="narrow"} +Type +: `DirectoryProperty` + + +### sandboxSystemDirectory +{#SandboxAware-sandboxSystemDirectory} + +A system directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory). + +{style="narrow"} +Type +: `DirectoryProperty` + + +### sandboxLogDirectory +{#SandboxAware-sandboxLogDirectory} + +A log directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory). + +{style="narrow"} +Type +: `DirectoryProperty` + ## SigningAware {#SigningAware} +The interface provides the path to the Marketplace ZIP Signer executable. + +It is required to have a dependency on the Marketplace ZIP Signer added to the project with [`intellijPlatform.zipSigner()`](tools_intellij_platform_gradle_plugin_dependencies_extension.md) dependencies extension. + + +### zipSignerExecutable +{#SigningAware-zipSignerExecutable} + +Path to the Marketplace ZIP Signer executable. + +{style="narrow"} +Type +: `RegularFileProperty` + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 0cd525d1f..073eeca86 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -7,6 +7,34 @@ ## buildPlugin {#buildPlugin} +This class represents a task for building a plugin and preparing a ZIP archive for deployment. + +It uses the content produced by [`prepareSandbox`](#prepareSandbox) and [`jarSearchableOptions`](#jarSearchableOptions) tasks as an input. + + +### archiveBaseName +{#buildPlugin-archiveBaseName} + +{style="narrow"} +Type +: `Property` + +Default value +: [`prepareSandbox.pluginName`](#prepareSandbox-pluginName) + + +### archiveFile +{#buildPlugin-archiveFile} + +The archive file which represents the output file produced by the task. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`buildPlugin.archiveFile`](#buildPlugin-archiveFile) + ## buildSearchableOptions {#buildSearchableOptions} @@ -27,6 +55,76 @@ See also: ## initializeIntelliJPlatformPlugin {#initializeIntelliJPlatformPlugin} +Initializes the IntelliJ Platform Gradle Plugin and performs various checks, like if the plugin is up-to-date. + +### offline +{#initializeIntelliJPlatformPlugin-offline} + +Determines if the operation is running in offline mode. + +Depends on Gradle start parameters + +{style="narrow"} +Type +: `Property` + +Default value +: `StartParameter.isOffline` + +See also: +- [StartParameter](https://docs.gradle.org/current/javadoc/org/gradle/StartParameter.html) +- [Command Line Execution Options](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_execution_options) + + +### selfUpdateCheck +{#initializeIntelliJPlatformPlugin-selfUpdateCheck} + +Represents the property for checking if self-update is enabled. + +{style="narrow"} +Type +: `Property` + +Default value +: [Build Features: `selfUpdateCheck`](tools_intellij_platform_gradle_plugin_build_features.md#selfUpdateCheck) + + +### selfUpdateLock +{#initializeIntelliJPlatformPlugin-selfUpdateLock} + +Represents a lock file used to limit the plugin version checks in time. +If a file is absent, and other conditions are met, the version check is performed. + +{style="narrow"} +Type +: `RegularFileProperty` + + +### coroutinesJavaAgent +{#initializeIntelliJPlatformPlugin-coroutinesJavaAgent} + +Java Agent file for the Coroutines library, which is required to enable coroutines debugging. + +{style="narrow"} +Type +: `Property` + +Default value +: `[buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar` + +See also: +- [Task Awares: `CoroutinesJavaAgentAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CoroutinesJavaAgentAware) + + +### pluginVersion +{#initializeIntelliJPlatformPlugin-pluginVersion} + +Represents the current version of the plugin. + +{style="narrow"} +Type +: `Property` + ## instrumentCode {#instrumentCode} @@ -82,7 +180,7 @@ Type : `RegularFileProperty` Default value -: build/tmp/patchPluginXml/plugin.xml +: [buildDirectory]/tmp/patchPluginXml/plugin.xml ### pluginId {#patchPluginXml-pluginId} @@ -104,7 +202,6 @@ Default value : [`intellijPlatform.pluginConfiguration.id`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-id) See also: -- [Extension: `intellijPlatform.pluginConfiguration.id`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-id) - [Plugin Configuration File: `id`](plugin_configuration_file.md#idea-plugin__id) @@ -123,7 +220,6 @@ Default value : [`intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) See also: -- [Extension: `intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) - [Plugin Configuration File: `name`](plugin_configuration_file.md#idea-plugin__name) @@ -144,7 +240,6 @@ Default value : [`intellijPlatform.pluginConfiguration.version`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-version) See also: -- [Extension: `intellijPlatform.pluginConfiguration.version`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-version) - [Plugin Configuration File: `version`](plugin_configuration_file.md#idea-plugin__version) @@ -166,7 +261,6 @@ Default value : [`intellijPlatform.pluginConfiguration.description`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-description) See also: -- [Extension: `intellijPlatform.pluginConfiguration.description`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-description) - [Plugin Configuration File: `description`](plugin_configuration_file.md#idea-plugin__description) @@ -189,7 +283,6 @@ Default value : [`intellijPlatform.pluginConfiguration.changeNotes`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-changeNotes) See also: -- [Extension: `intellijPlatform.pluginConfiguration.changeNotes`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-changeNotes) - [Plugin Configuration File: `change-notes`](plugin_configuration_file.md#idea-plugin__change-notes) @@ -209,7 +302,6 @@ Default value : [`intellijPlatform.pluginConfiguration.productDescriptor.code`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-code) See also: -- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.code`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-code) - [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) @@ -228,7 +320,6 @@ Default value : [`intellijPlatform.pluginConfiguration.productDescriptor.releaseDate`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseDate) See also: -- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.releaseDate`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseDate) - [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) @@ -247,7 +338,6 @@ Default value : [`intellijPlatform.pluginConfiguration.productDescriptor.releaseVersion`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseVersion) See also: -- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.releaseVersion`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-releaseVersion) - [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) @@ -269,7 +359,6 @@ Default value : `false` See also: -- [Extension: `intellijPlatform.pluginConfiguration.productDescriptor.optional`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor-optional) - [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) @@ -288,7 +377,6 @@ Default value : [`intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild) See also: -- [Extension: `intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild) - [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) @@ -308,7 +396,6 @@ Default value : [`intellijPlatform.pluginConfiguration.ideaVersion.untilBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild) See also: -- [Extension: `intellijPlatform.pluginConfiguration.ideaVersion.untilBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild) - [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) @@ -327,7 +414,6 @@ Default value : [`intellijPlatform.pluginConfiguration.vendor.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-name) See also: -- [Extension: `intellijPlatform.pluginConfiguration.vendor.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-name) - [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) @@ -346,7 +432,6 @@ Default value : [`intellijPlatform.pluginConfiguration.vendor.email`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-email) See also: -- [Extension: `intellijPlatform.pluginConfiguration.vendor.email`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-email) - [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) @@ -365,16 +450,86 @@ Default value : [`intellijPlatform.pluginConfiguration.vendor.url`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-url) See also: -- [Extension: `intellijPlatform.pluginConfiguration.vendor.url`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-vendor-url) - [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) ## prepareSandbox {#prepareSandbox} +Prepares a sandbox environment with the installed plugin and its dependencies. + +The sandbox directory is required to run a guest IDE and tests in isolation from other instances, like when multiple IntelliJ Platforms are used for testing with [`runIde`](#runIde), [`testIde`](#testIde), [`testIdeUi`](#testIdeUi), or [`testIdePerformance`](#testIdePerformance) tasks. + +To fully utilize the sandbox capabilities in a task, make it extend the [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) interface. + See also: - [Extension: `intellijPlatform.sandboxContainer`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-sandboxContainer) -- [Task Awares: `SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) + + +### defaultDestinationDirectory +{#prepareSandbox-defaultDestinationDirectory} + +Default sandbox destination directory to where the plugin files will be copied into. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [`SandboxAware.sandboxPluginsDirectory`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware-sandboxPluginsDirectory) + + +### pluginName +{#prepareSandbox-pluginName} + +The name of the plugin. + +{style="narrow"} +Type +: `String` + +Default value +: [`intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) + + +### pluginJar +{#prepareSandbox-pluginJar} + +The output of `Jar` task. +The proper `Jar.archiveFile` is picked depending on if code instrumentation is enabled. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: `Jar.archiveFile` + +See also: +- [Extension: `intellijPlatform.instrumentCode`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-instrumentCode) + + +### pluginsClasspath +{#prepareSandbox-pluginsClasspath} + +List of dependencies on external plugins resolved from the `intellijPlatformPluginsExtracted` configuration. + +{style="narrow"} +Type +: `ConfigurableFileCollection` + +See also: +- [Dependencies Extension](tools_intellij_platform_gradle_plugin_dependencies_extension.md) + + +### runtimeClasspath +{#prepareSandbox-runtimeClasspath} + +Dependencies removed with the `runtimeClasspath` configuration. + +{style="narrow"} +Type +: `ConfigurableFileCollection` ## printBundledPlugins @@ -401,19 +556,17 @@ See also: ZIP archive to be published to the remote repository. -By default, it uses an output `archiveFile` of the [`signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) task if plugin signing is configured, otherwise [`buildPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#buildPlugin). +By default, it uses an output `archiveFile` of the [`signPlugin`](#signPlugin) task if plugin signing is configured, otherwise [`buildPlugin`](#buildPlugin). {style="narrow"} Type -: `Property` +: `RegularFileProperty` Default value -: [`signPlugin.archiveFile`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin-archiveFile) or [`buildPlugin.archiveFile`](tools_intellij_platform_gradle_plugin_tasks.md#buildPlugin-archiveFile) +: [`signPlugin.archiveFile`](#signPlugin-archiveFile) or [`buildPlugin.archiveFile`](#buildPlugin-archiveFile) See also: - [Extension: `intellijPlatform.signing`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing) -- [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) -- [Tasks: `buildPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#buildPlugin) ### host @@ -428,9 +581,6 @@ Type Default value : [`intellijPlatform.publishing.host`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-host) -See also: -- [Extension `intellijPlatform.publishing.host`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-host) - ### token {#publishPlugin-token} @@ -447,9 +597,6 @@ Required Default value : [`intellijPlatform.publishing.token`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-token) -See also: -- [Extension: `intellijPlatform.publishing.token`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-token) - ### channel {#publishPlugin-channel} @@ -463,9 +610,6 @@ Type Default value : [`intellijPlatform.publishing.channel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channel) -See also: -- [Extension: `intellijPlatform.publishing.channel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channel) - ### hidden {#publishPlugin-hidden} @@ -480,7 +624,6 @@ Default value : [`intellijPlatform.publishing.hidden`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-hidden) See also: -- [Extension: `intellijPlatform.publishing.hidden`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-hidden) - [Hidden release](https://plugins.jetbrains.com/docs/marketplace/hidden-plugin.html) @@ -496,12 +639,6 @@ Type Default value : [`intellijPlatform.publishing.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-toolboxEnterprise) -See also: -- [Extension: `intellijPlatform.publishing.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-toolboxEnterprise) - - -## runIdePerformanceTest -{#runIdePerformanceTest} > Not implemented. > @@ -523,11 +660,11 @@ See also: ## signPlugin {#signPlugin} -Signs the ZIP archive with the provided key using [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) library. +Signs the ZIP archive with the provided key using the [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) library. -To sign the plugin before publishing to [JetBrains Marketplace](https://plugins.jetbrains.com) with the [SignPluginTask] task, it is required to provide a certificate chain and a private key with its password using `signPlugin { ... }` Plugin Signing DSL. +To sign the plugin before publishing to [JetBrains Marketplace](https://plugins.jetbrains.com) with the [`signPlugin`](#signPlugin) task, it is required to provide a certificate chain and a private key with its password using [`intellijPlatform.signing`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing) extension. -As soon as [privateKey] (or [privateKeyFile]) and [certificateChain] (or [certificateChainFile]) properties are specified, the task will be executed automatically right before the [PublishPluginTask] task. +As soon as [`privateKey`](#signPlugin-privateKey) (or [`privateKeyFile`](#signPlugin-privateKeyFile)) and [`certificateChain`](#signPlugin-certificateChain) (or [`certificateChainFile`](#signPlugin-certificateChainFile) properties are specified, the task will be executed automatically right before the [`publishPlugin`](#publishPlugin) task. For more details, see [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html) article. @@ -547,9 +684,6 @@ Type Default value : [`buildPlugin.archiveFile`](#buildPlugin-archiveFile) -See also: -- [Tasks: `buildPlugin.archiveFile`](#buildPlugin-archiveFile) - ### signedArchiveFile {#signPlugin-signedArchiveFile} @@ -581,9 +715,6 @@ Type Default value : [`intellijPlatform.signing.keyStore`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStore) -See also: -- [Extension: `intellijPlatform.signing.keyStore`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStore) - ### keyStorePassword {#signPlugin-keyStorePassword} @@ -598,9 +729,6 @@ Type Default value : [`intellijPlatform.signing.keyStorePassword`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStorePassword) -See also: -- [Extension: `intellijPlatform.signing.keyStorePassword`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStorePassword) - ### keyStoreKeyAlias {#signPlugin-keyStoreKeyAlias} @@ -615,9 +743,6 @@ Type Default value : [`intellijPlatform.signing.keyStoreKeyAlias`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreKeyAlias) -See also: -- [Extension: `intellijPlatform.signing.keyStoreKeyAlias`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreKeyAlias) - ### keyStoreType {#signPlugin-keyStoreType} @@ -632,9 +757,6 @@ Type Default value : [`intellijPlatform.signing.keyStoreType`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreType) -See also: -- [Extension: `intellijPlatform.signing.keyStoreType`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreType) - ### keyStoreProviderName {#signPlugin-keyStoreProviderName} @@ -649,9 +771,6 @@ Type Default value : [`intellijPlatform.signing.keyStoreProviderName`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreProviderName) -See also: -- [Extension: `intellijPlatform.signing.keyStoreProviderName`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreProviderName) - ### privateKey {#signPlugin-privateKey} @@ -666,9 +785,6 @@ Type Default value : [`intellijPlatform.signing.privateKey`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKey) -See also: -- [Extension: `intellijPlatform.signing.privateKey`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKey) - ### privateKeyFile {#signPlugin-privateKeyFile} @@ -683,9 +799,6 @@ Type Default value : [`intellijPlatform.signing.privateKeyFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKeyFile) -See also: -- [Extension: `intellijPlatform.signing.privateKeyFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKeyFile) - ### password {#signPlugin-password} @@ -700,9 +813,6 @@ Type Default value : [`intellijPlatform.signing.password`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-password) -See also: -- [Extension: `intellijPlatform.signing.password`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-password) - ### certificateChain {#signPlugin-certificateChain} @@ -718,9 +828,6 @@ Type Default value : [`intellijPlatform.signing.certificateChain`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChain) -See also: -- [Extension: `intellijPlatform.signing.certificateChain`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChain) - ### certificateChainFile {#signPlugin-certificateChainFile} @@ -736,14 +843,19 @@ Type Default value : [`intellijPlatform.signing.certificateChainFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChainFile) -See also: -- [Extension: `intellijPlatform.signing.certificateChainFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChainFile) - ## testIde {#testIde} +## testIdePerformance +{#testIdePerformance} + +> Not implemented. +> +{style="warning"} + + ## testIdeUi {#testIdeUi} @@ -767,5 +879,169 @@ See also: ## verifyPlugin {#verifyPlugin} +Runs the IntelliJ Plugin Verifier CLI tool to check the binary compatibility with specified IDE builds. + +See also: +- [Awares: `PluginVerifierAware`](tools_intellij_platform_gradle_plugin_task_awares.md#PluginVerifierAware) +- [Extension: `intellijPlatform.verifyPlugin`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin) +- [Types: `FailureLevel`](tools_intellij_platform_gradle_plugin_types.md#FailureLevel) +- [Types: `Subsystems`](tools_intellij_platform_gradle_plugin_types.md#Subsystems) +- [Types: `VerificationReportsFormats`](tools_intellij_platform_gradle_plugin_types.md#VerificationReportsFormats) +- [IntelliJ Plugin Verifier](https://github.com/JetBrains/intellij-plugin-verifier) +- [Verifying Plugin Compatibility](https://plugins.jetbrains.com/docs/intellij/verifying-plugin-compatibility.html) + + +### ides +{#verifyPlugin-ides} + +Holds a reference to IntelliJ Platform IDEs which will be used by the IntelliJ Plugin Verifier CLI tool for the binary plugin verification. + +The list of IDEs is controlled with the [`intellijPlatform.verifyPlugin.ides`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-ides) extension. + +{style="narrow"} +Type +: `ConfigurableFileCollection` + + +### archiveFile +{#verifyPlugin-archiveFile} + +Input ZIP archive file of the plugin to verify. +If empty, the task will be skipped. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`buildPlugin.archiveFile`](#buildPlugin-archiveFile) + + +### externalPrefixes +{#verifyPlugin-externalPrefixes} + +The list of class prefixes from the external libraries. +The Plugin Verifier will not report `No such class` for classes of these packages. + +{style="narrow"} +Type +: `ListProperty` + +Default value +: [`intellijPlatform.verifyPlugin.externalPrefixes`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-externalPrefixes) + + +### failureLevel +{#verifyPlugin-failureLevel} + +Defines the verification level at which the task should fail if any reported issue matches. + +{style="narrow"} +Type +: [`ListProperty`](tools_intellij_platform_gradle_plugin_types.md#FailureLevel) + +Default value +: [`intellijPlatform.verifyPlugin.failureLevel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-failureLevel) + + +### freeArgs +{#verifyPlugin-freeArgs} + +The list of free arguments is passed directly to the IntelliJ Plugin Verifier CLI tool. + +They can be used in addition to the arguments that are provided by dedicated options. + +{style="narrow"} +Type +: `ListProperty` + +Default value +: [`intellijPlatform.verifyPlugin.freeArgs`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-freeArgs) + + +### ignoredProblemsFile +{#verifyPlugin-ignoredProblemsFile} + +A file that contains a list of problems that will be ignored in a report. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`intellijPlatform.verifyPlugin.ignoredProblemsFile`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-ignoredProblemsFile) + + +### offline +{#verifyPlugin-offline} + +Determines if the operation is running in offline mode. + +Depends on Gradle start parameters + +{style="narrow"} +Type +: `Property` + +Default value +: `StartParameter.isOffline` + +See also: +- [StartParameter](https://docs.gradle.org/current/javadoc/org/gradle/StartParameter.html) +- [Command Line Execution Options](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_execution_options) + + +### subsystemsToCheck +{#verifyPlugin-subsystemsToCheck} + +Specifies which subsystems of IDE should be checked. + +{style="narrow"} +Type +: [`Subsystems`](tools_intellij_platform_gradle_plugin_types.md#Subsystems) + +Default value +: [`intellijPlatform.verifyPlugin.subsystemsToCheck`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-subsystemsToCheck) + + +### teamCityOutputFormat +{#verifyPlugin-teamCityOutputFormat} + +A flag that controls the output format. +If set to `true`, the TeamCity compatible output will be returned to stdout. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.verifyPlugin.teamCityOutputFormat`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-teamCityOutputFormat) + + +### verificationReportsDirectory +{#verifyPlugin-verificationReportsDirectory} + +The path to the directory where verification reports will be saved. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [`intellijPlatform.verifyPlugin.verificationReportsDirectory`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-verificationReportsDirectory) + + +### verificationReportsFormats +{#verifyPlugin-verificationReportsFormats} + +The output formats of the verification reports. + +{style="narrow"} +Type +: [`ListProperty`](tools_intellij_platform_gradle_plugin_types.md#VerificationReportsFormats) + +Default value +: [`intellijPlatform.verifyPlugin.verificationReportsFormats`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-verificationReportsFormats) + diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md new file mode 100644 index 000000000..79f979dd1 --- /dev/null +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md @@ -0,0 +1,189 @@ + + +# Types + +IntelliJ Platform Gradle Plugin data types, enums, and constants. + +## FailureLevel +{#FailureLevel} + +``` +org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel +``` + +Enum class describing the failure level of the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. + +| Name | Description | +|------------------------------------|-------------------------------------------------------------------------------------| +| `COMPATIBILITY_WARNINGS` | Compatibility warnings detected against the specified IDE version. | +| `COMPATIBILITY_PROBLEMS` | Compatibility problems detected against the specified IDE version. | +| `DEPRECATED_API_USAGES` | Plugin uses API marked as deprecated (`@Deprecated`). | +| `SCHEDULED_FOR_REMOVAL_API_USAGES` | Plugin uses API marked as scheduled for removal (`ApiStatus.@ScheduledForRemoval`). | +| `EXPERIMENTAL_API_USAGES` | Plugin uses API marked as experimental (`ApiStatus.@Experimental`). | +| `INTERNAL_API_USAGES` | Plugin uses API marked as internal (`ApiStatus.@Internal`). | +| `OVERRIDE_ONLY_API_USAGES` | Override-only API is used incorrectly (`ApiStatus.@OverrideOnly`). | +| `NON_EXTENDABLE_API_USAGES` | Non-extendable API is used incorrectly (`ApiStatus.@NonExtendable`). | +| `PLUGIN_STRUCTURE_WARNINGS` | The structure of the plugin is not valid. | +| `MISSING_DEPENDENCIES` | Plugin has some dependencies missing. | +| `INVALID_PLUGIN` | Provided plugin artifact is not valid. | +| `NOT_DYNAMIC` | Plugin probably cannot be enabled or disabled without IDE restart | +| `ALL` | Contains all possible options. | +| `NONE` | Contains no option. | + +See also: +- [Extension: `intellijPlatform.verifyPlugin.failureLevel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-failureLevel) +- [Tasks: `verifyPlugin.failureLevel`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-failureLevel) + + +## IntelliJPlatformType +{#IntelliJPlatformType} + +``` +org.jetbrains.intellij.platform.gradle.IntelliJPlatformType +``` + +Describes all IntelliJ Platform types available to be used for plugin development, dependency resolution, and plugin verification. + +Each entry is composed of a product code name and coordinates used for dependency and binary release resolution. + +| Name | Code | Coordinates | +|-------------------------|--------|----------------------------------------------------| +| `AndroidStudio` | `AI` | `com.google.android.studio:studio` | +| `CLion` | `CL` | `com.jetbrains.intellij.clion:clion` | +| `Fleet` | `FLIJ` | `com.jetbrains.intellij.fleetBackend:fleetBackend` | +| `Gateway` | `GW` | `com.jetbrains.intellij.gateway:gateway` | +| `GoLand` | `GO` | `com.jetbrains.intellij.goland:goland` | +| `IntellijIdeaCommunity` | `IC` | `com.jetbrains.intellij.idea:ideaIC` | +| `IntellijIdeaUltimate` | `IU` | `com.jetbrains.intellij.idea:ideaIU` | +| `PhpStorm` | `PS` | `com.jetbrains.intellij.phpstorm:phpstorm` | +| `PyCharmProfessional` | `PY` | `com.jetbrains.intellij.pycharm:pycharmPY` | +| `PyCharmCommunity` | `PC` | `com.jetbrains.intellij.pycharm:pycharmPC` | +| `Rider` | `RD` | `com.jetbrains.intellij.rider:riderRD` | +| `RustRover` | `RR` | `com.jetbrains.intellij.rustrover:RustRover` | +| `Writerside` | `WRS` | `com.jetbrains.intellij.idea:writerside` | + + +## ProductInfo +{#ProductInfo} + +Represents information about the IntelliJ Platform product. + +The information is retrieved from the product-info.json file in the IntelliJ Platform directory. + +| Name | Description | +|-------------------|--------------------------------------------------------------------------| +| name | The product's name, like "IntelliJ IDEA". | +| version | The marketing version of the product, like "2023.2". | +| versionSuffix | The suffix of the version, like "EAP". | +| buildNumber | The build number of the product, like "232.8660.185". | +| productCode | The product code, like "IU". | +| dataDirectoryName | The directory name of the product data. | +| svgIconPath | The path to the SVG icon of the product. | +| productVendor | The vendor of the product. | +| launch | The list of OS- and arch-specific launch configurations for the product. | +| customProperties | The list of custom properties of the product. | +| bundledPlugins | The list of bundled plugins provided with the current release. | +| fileExtensions | The list of file extensions associated with the product. | +| modules | The list of modules of the product. | + +### assertSupportedVersion() +{#ProductInfo-assertSupportedVersion} + +Asserts that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version. + +If the provided version is lower, an `IllegalArgumentException` is thrown with an appropriate message. + +{style="narrow"} +Throws +: `IllegalArgumentException` + + +## ProductRelease.Channel +{#ProductRelease-Channel} + +``` +org.jetbrains.intellij.platform.gradle.model.ProductRelease +``` + +List of available channels used by JetBrains IDEs and Android Studio for describing binary releases. + +| Name | JetBrains IDEs | Android Studio | +|-------------|:--------------:|:--------------:| +| `EAP` | X | | +| `MILESTONE` | | X | +| `BETA` | | X | +| `RELEASE` | X | X | +| `CANARY` | | X | +| `PATCH` | | X | +| `RC` | | X | +| `PREVIEW` | | X | + +See also: +- [Extension: `intellijPlatform.verifyPlugin.ides`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-ides) +- [Tasks: `printProductsReleases`](tools_intellij_platform_gradle_plugin_tasks.md#printProductsReleases) + + +## ProductReleasesValueSource.FilterParameters +{#ProductReleasesValueSource-FilterParameters} + +``` +org.jetbrains.intellij.platform.gradle.provider.ProductReleasesValueSource +``` + +Interface that provides a clear way to filter binary product releases for the purposes of IntelliJ Plugin Verifier. + +| Name | Description | +|--------------|------------------------------------------------------------------------------------------------------| +| `sinceBuild` | Build number from which the binary IDE releases will be matched. | +| `untilBuild` | Build number until which the binary IDE releases will be matched. | +| `types` | A list of [`IntelliJPlatformType`](#IntelliJPlatformType) types to match. | +| `channels` | A list of [`ProductRelease.Channel`](#ProductRelease-Channel) types of binary releases to search in. | + +See also: +- [Extension: `intellijPlatform.verifyPlugin.ides`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-ides) +- [Tasks: `printProductsReleases`](tools_intellij_platform_gradle_plugin_tasks.md#printProductsReleases) + + +## Subsystems +{#Subsystems} + +``` +org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.Subsystems +``` + +Specifies which subsystems of IDE should be checked by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. + +| Name | Description | +|-------------------|----------------------------------------------| +| `ALL` | Verify all code. | +| `ANDROID_ONLY` | Verify only code related to Android support. | +| `WITHOUT_ANDROID` | Exclude problems related to Android support. | + +See also: +- [Extension: `intellijPlatform.verifyPlugin.subsystemsToCheck`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-subsystemsToCheck) +- [Tasks: `verifyPlugin.subsystemsToCheck`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-subsystemsToCheck) + + +## VerificationReportsFormats +{#VerificationReportsFormats} + +``` +org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.VerificationReportsFormats +``` + +Enum class describing the type of the results produced by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. + +| Name | Description | +|------------|--------------------------------| +| `PLAIN` | Plain text file. | +| `HTML` | HTML formatted output file. | +| `MARKDOWN` | Markdown file. | +| `ALL` | Contains all possible options. | +| `NONE` | Contains no option. | + +See also: +- [Extension: `intellijPlatform.verifyPlugin.verificationReportsFormats`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-verificationReportsFormats) +- [Tasks: `verifyPlugin.verificationReportsFormats`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-verificationReportsFormats) + + + From 52f1bccf4a78765a545480b03f99b874641ae07d Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 5 Feb 2024 17:18:30 +0100 Subject: [PATCH 09/54] IntelliJ Platform Gradle Plugin: Repositories Extension --- ...rm_gradle_plugin_repositories_extension.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md index 32a72673d..cdb09e79d 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md @@ -4,5 +4,52 @@ IntelliJ Platform Gradle Plugin repositories extension. +This is an extension class for managing IntelliJ Platform repositories in a Gradle build script. +It's applied to the `RepositoryHandler`. + +Available in both `Project` scope and Gradle Settings for `DependencyResolutionManagement`. + +It provides methods to add: + +- IntelliJ Platform repositories (for releases, snapshots, and nightly builds) +- JetBrains Marketplace repository for fetching plugins +- JetBrains Runtime repository +- Android Studio and IntelliJ Platform binary release repositories (for IntelliJ Plugin Verifier) +- Ivy local repository (for correct access to local dependencies) + +**Example:** + +```kotlin +repositories { + // ... + + intellijPlatform { + // ... + + releases() + snapshots() + nightly() + marketplace() + jetbrainsRuntime() + binaryReleasesAndroidStudio() + binaryReleases() + ivy() + recommended() + } +} +``` + +| Function | Description | +|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `releases()` | Adds a repository for accessing IntelliJ Platform stable releases. | +| `snapshots()` | Adds a repository for accessing IntelliJ Platform snapshot releases. | +| `nightly()` | Adds a repository for accessing IntelliJ Platform nightly releases. | +| `marketplace()` | Adds a repository for accessing plugins hosted on JetBrains Marketplace. | +| `jetbrainsRuntime()` | Adds a repository for accessing JetBrains Runtime releases. | +| `binaryReleasesAndroidStudio()` | Adds a repository for accessing Android Studio binary releases. | +| `binaryReleases()` | Adds a repository for accessing IntelliJ Platform binary releases. | +| `ivy()` | Adds a local Ivy repository for resolving local Ivy XML files used for describing artifacts like local IntelliJ Platform instance, bundled plugins, and other dependencies that utilize `createIvyDependency`. | +| `recommended()` | Applies a set of recommended repositories. | + From 197253847ea47512ab9d614d9050c9690ad1368c Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 5 Feb 2024 17:23:09 +0100 Subject: [PATCH 10/54] IntelliJ Platform Gradle Plugin: fixed types --- ...ls_intellij_platform_gradle_plugin_tasks.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 073eeca86..92e786995 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -486,7 +486,7 @@ The name of the plugin. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) @@ -710,7 +710,7 @@ Refers to `ks` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.keyStore`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStore) @@ -724,7 +724,7 @@ Refers to `ks-pass` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.keyStorePassword`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStorePassword) @@ -738,7 +738,7 @@ Refers to `ks-key-alias` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.keyStoreKeyAlias`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreKeyAlias) @@ -752,7 +752,7 @@ Refers to `ks-type` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.keyStoreType`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreType) @@ -766,7 +766,7 @@ Refers to `ks-provider-name` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.keyStoreProviderName`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-keyStoreProviderName) @@ -780,7 +780,7 @@ Refers to `key` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.privateKey`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-privateKey) @@ -808,7 +808,7 @@ Refers to `key-pass` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.password`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-password) @@ -823,7 +823,7 @@ Refers to `cert` CLI option. {style="narrow"} Type -: `String` +: `Property` Default value : [`intellijPlatform.signing.certificateChain`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing-certificateChain) From 28a40af68f7e05c8bdfbf8d71fdede54ffdd97b0 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 5 Feb 2024 17:28:17 +0100 Subject: [PATCH 11/54] IntelliJ Platform Gradle Plugin: Use `=` assignment --- ...tellij_platform_gradle_plugin_extension.md | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index 600664d5e..8e46a94b8 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -17,9 +17,9 @@ After the IntelliJ Platform Gradle Plugin is applied, the `intellijPlatform` ext ```kotlin intellijPlatform { - instrumentCode.set(true) - buildSearchableOptions.set(true) - sandboxContainer.set("...") + instrumentCode = true + buildSearchableOptions = true + sandboxContainer = "..." pluginConfiguration { // ... @@ -106,15 +106,14 @@ intellijPlatform { // ... pluginConfiguration { - id.set("my-plugin-id") - name.set("My Awesome Plugin") - version.set("1.0.0") - description.set("It's an awesome plugin!") - changeNotes.set( + id = "my-plugin-id" + name = "My Awesome Plugin" + version = "1.0.0" + description = "It's an awesome plugin!" + changeNotes = """ A descriptive release note... """.trimIndent() - ) productDescriptor { // ... @@ -243,10 +242,10 @@ intellijPlatform { // ... productDescriptor { - code.set("MY_CODE") - releaseDate.set("20240217") - releaseVersion.set("20241") - optional.set(false) + code = "MY_CODE" + releaseDate = "20240217" + releaseVersion = "20241" + optional = false } } } @@ -340,8 +339,8 @@ intellijPlatform { // ... ideaVersion { - sinceBuild.set("241") - untilBuild.set("241.*") + sinceBuild = "241" + untilBuild = "241.*" } } } @@ -407,9 +406,9 @@ intellijPlatform { // ... vendor { - name.set("JetBrains") - email.set("hello@jetbrains.com") - url.set("https://www.jetbrains.com") + name = "JetBrains" + email = "hello@jetbrains.com" + url = "https://www.jetbrains.com" } } } @@ -477,11 +476,11 @@ intellijPlatform { // ... publishing { - host.set("") - token.set("7hR4nD0mT0k3n_8f2eG") - channel.set("default") - toolboxEnterprise.set(false) - hidden.set(false) + host = "" + token = "7hR4nD0mT0k3n_8f2eG" + channel = "default" + toolboxEnterprise = false + hidden = false } } ``` @@ -580,17 +579,17 @@ intellijPlatform { // ... signing { - cliPath.set(file("/path/to/marketplace-zip-signer-cli.jar")) - keyStore.set(file("/path/to/keyStore.ks")) - keyStorePassword.set("...") - keyStoreKeyAlias.set("...") - keyStoreType.set("...") - keyStoreProviderName.set("...") - privateKey.set("...") - privateKeyFile.set(file("/path/to/private.pem")) - password.set("...") - certificateChain.set("...") - certificateChainFile.set(file("/path/to/chain.crt")) + cliPath = file("/path/to/marketplace-zip-signer-cli.jar") + keyStore = file("/path/to/keyStore.ks") + keyStorePassword = "..." + keyStoreKeyAlias = "..." + keyStoreType = "..." + keyStoreProviderName = "..." + privateKey = "..." + privateKeyFile = file("/path/to/private.pem") + password = "..." + certificateChain = "..." + certificateChainFile = file("/path/to/chain.crt") } } ``` @@ -773,17 +772,17 @@ intellijPlatform { // ... verifyPlugin { - cliPath.set(file("/path/to/plugin-verifier-cli.jar")) - freeArgs.set(listOf("foo", "bar")) - homeDirectory.set(file("/path/to/pluginVerifierHomeDirectory/")) - downloadDirectory.set(file("/path/to/pluginVerifierHomeDirectory/ides/")) - failureLevel.set(VerifyPluginTask.FailureLevel.ALL) - verificationReportsDirectory.set("build/reports/pluginVerifier") - verificationReportsFormats.set(VerifyPluginTask.VerificationReportsFormats.ALL) - externalPrefixes.set("com.example") - teamCityOutputFormat.set(false) - subsystemsToCheck.set(VerifyPluginTask.Subsystems.ALL) - ignoredProblemsFile.set(file("/path/to/ignoredProblems.txt")) + cliPath = file("/path/to/plugin-verifier-cli.jar") + freeArgs = listOf("foo", "bar") + homeDirectory = file("/path/to/pluginVerifierHomeDirectory/") + downloadDirectory = file("/path/to/pluginVerifierHomeDirectory/ides/") + failureLevel = VerifyPluginTask.FailureLevel.ALL + verificationReportsDirectory = "build/reports/pluginVerifier" + verificationReportsFormats = VerifyPluginTask.VerificationReportsFormats.ALL + externalPrefixes = "com.example" + teamCityOutputFormat = false + subsystemsToCheck = VerifyPluginTask.Subsystems.ALL + ignoredProblemsFile = file("/path/to/ignoredProblems.txt") ides { // ... From 77308ab68cdb7d74909925704ffe878c3e928863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 5 Feb 2024 17:44:28 +0100 Subject: [PATCH 12/54] add "early access" callout to all subpages --- .../tools_intellij_platform_gradle_plugin.md | 10 +++++++--- ...s_intellij_platform_gradle_plugin_build_features.md | 1 + ...ij_platform_gradle_plugin_dependencies_extension.md | 2 ++ .../tools_intellij_platform_gradle_plugin_extension.md | 2 ++ .../tools_intellij_platform_gradle_plugin_migration.md | 2 ++ ...ij_platform_gradle_plugin_repositories_extension.md | 2 ++ ...ools_intellij_platform_gradle_plugin_task_awares.md | 2 ++ .../tools_intellij_platform_gradle_plugin_tasks.md | 2 ++ .../tools_intellij_platform_gradle_plugin_types.md | 2 ++ 9 files changed, 22 insertions(+), 3 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index b8c3e7413..f21f3c603 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -4,7 +4,7 @@ IntelliJ Platform Gradle Plugin user and migration guide. - + **Current Release**: Early Access Preview @@ -18,8 +18,10 @@ The _IntelliJ Platform Gradle Plugin 2.x_ is a plugin for the Gradle build syste It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ in the future. -> This plugin is currently in **Early Access** and may not support all features and project setups yet (see also [](#requirements)). -> Please report bugs or problems in the above-linked issue tracker or Slack channel. + + +> This plugin is currently in **Early Access** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)). +> Please report bugs or problems in GitHub issue tracker or Slack channel (see [here](tools_intellij_platform_gradle_plugin.md#tldr)). > > Any documentation issues on this page should be reported using the feedback form on the bottom of this page. > @@ -27,6 +29,8 @@ It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ i > {title="Early Access Status" style="warning"} + + ## Requirements The following platforms and environments are supported: diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md index ca9c2a75f..021dc72e3 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md @@ -4,6 +4,7 @@ IntelliJ Platform Gradle Plugin build features. + The IntelliJ Platform Gradle Plugin build features dedicated to control some of the low-level Gradle plugin behaviors. To enable or disable a particular feature, add a Project property to the gradle.properties file with the following pattern: diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md index 840d1c8d2..4c3d487b0 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -4,6 +4,8 @@ IntelliJ Platform Gradle Plugin dependencies extension. + + Extension class for managing IntelliJ Platform dependencies in a Gradle build script applied to the `DependencyHandler`. This class provides methods for adding dependencies to different IntelliJ Platform products and managing local dependencies. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index 8e46a94b8..32bfc4540 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -4,6 +4,8 @@ IntelliJ Platform Gradle Plugin extension. + + The _IntelliJ Platform Gradle Plugin_ introduces a top-level `intellijPlatform` extension. It consists of sections dedicated to the general Gradle plugin configuration, plugin.xml definition, publishing, signing, and verifying of the output plugin for IntelliJ-based IDEs. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md index bfbc9f927..4e467d11b 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md @@ -4,6 +4,8 @@ This is the IntelliJ Platform Gradle Plugin migration guide from the Gradle IntelliJ Plugin 1.x + + ## Plugin name change As the `2.x` branch brings significant breaking changes to the plugin, we also decided to change its name from _Gradle IntelliJ Plugin_ to _IntelliJ Platform Gradle Plugin_ as the old one was confused with the Gradle support plugin for IntelliJ-based IDEs. The plugin is published to the Gradle Plugin Portal with a new name as a new entry, and the old one is marked as deprecated. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md index cdb09e79d..8edf417d4 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md @@ -4,6 +4,8 @@ IntelliJ Platform Gradle Plugin repositories extension. + + This is an extension class for managing IntelliJ Platform repositories in a Gradle build script. It's applied to the `RepositoryHandler`. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md index 7ba3b0cc2..37202cf75 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -4,6 +4,8 @@ IntelliJ Platform Gradle Plugin task `*Aware` interfaces. + + The Task Awares is a set of interfaces that can be applied to custom Gradle tasks and, when registered using the dedicated register method, inject new features or properties with predefined values. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 92e786995..191e24e68 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -4,6 +4,8 @@ IntelliJ Platform Gradle Plugin tasks. + + ## buildPlugin {#buildPlugin} diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md index 79f979dd1..e452a6bb4 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md @@ -4,6 +4,8 @@ IntelliJ Platform Gradle Plugin data types, enums, and constants. + + ## FailureLevel {#FailureLevel} From 33ca10451f63f12e11db8a4f983d03b4134990d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 5 Feb 2024 18:02:39 +0100 Subject: [PATCH 13/54] tools_gradle_grammar_kit_plugin.md: edits, review --- ...tellij_platform_gradle_plugin_migration.md | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md index 4e467d11b..21d752bf8 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md @@ -2,35 +2,49 @@ # Migration Guide from Gradle IntelliJ Plugin -This is the IntelliJ Platform Gradle Plugin migration guide from the Gradle IntelliJ Plugin 1.x +IntelliJ Platform Gradle Plugin 2.x migration guide from Gradle IntelliJ Plugin 1.x ## Plugin name change -As the `2.x` branch brings significant breaking changes to the plugin, we also decided to change its name from _Gradle IntelliJ Plugin_ to _IntelliJ Platform Gradle Plugin_ as the old one was confused with the Gradle support plugin for IntelliJ-based IDEs. + +As the `2.x` branch brings significant breaking changes to the plugin, the name was changed from _Gradle IntelliJ Plugin_ to +_IntelliJ Platform Gradle Plugin_ as the old one was confused with the bundled Gradle support plugin in the IDE. The plugin is published to the Gradle Plugin Portal with a new name as a new entry, and the old one is marked as deprecated. ## Plugin ID change + Plugin ID has changed from `org.jetbrains.intellij` to `org.jetbrains.intellij.platform`. -To apply is, use: +To apply it, use: ```kotlin plugins { - id("org.jetbrains.intellij.platform") + id("org.jetbrains.intellij.platform") } ``` ## Minimal Gradle version -The minimal required Gradle version is now `8.0`. + +The minimal required Gradle version is now `8.0`. See also [](tools_intellij_platform_gradle_plugin.md#requirements). ## `intellij` extension -The `intellij {}` extension is no longer available and was replaced with `intellijPlatform {}` — note that the available properties differ. + +The `intellij {}` extension is no longer available and was replaced with `intellijPlatform {}`. +Note that the available properties differ, see [](tools_intellij_platform_gradle_plugin_extension.md) for details. ## `setupDependencies` task -To make IntelliJ SDK dependency available in the IDE for class resolution and code completion, there was the `setupDependencies` task introduced in the Gradle IntelliJ Plugin 1.x. -With IntelliJ Platform Gradle Plugin, such a task is no longer required, but if you are switching from the previous approach, Gradle still may want to execute it in the _afterSync_ phase. -To completely drop this approach, it is mandatory to remove its reference manualy in your IDE: -1. Open Gradle Tool Window -2. Right-click on the main module and select _Tasks Activation_ -3. In the _Tasks Activation_ modal window, find and remove the `setupDependencies` entry. +To make the IntelliJ SDK dependency available in the IDE, the `setupDependencies` task was provided by Gradle IntelliJ Plugin 1.x. +This task is no longer required, but when switching from 1.x, Gradle may still want to execute it in the _afterSync_ phase. +To completely drop this approach, it is mandatory to remove its reference manually in the IDE. + + + +1. Open Gradle Tool Window +2. Right-click on the main module and select Tasks Activation +3. In the Tasks Activation modal window, find and remove the `setupDependencies` entry. + + + + + From 9fefe1ac307310f0b8b94e4f1ba67d25dfbe5665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 5 Feb 2024 18:07:48 +0100 Subject: [PATCH 14/54] tools_intellij_platform_gradle_plugin_build_features.md: edits, review --- .../tools_intellij_platform_gradle_plugin_build_features.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md index 021dc72e3..452debe0f 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_build_features.md @@ -6,7 +6,7 @@ -The IntelliJ Platform Gradle Plugin build features dedicated to control some of the low-level Gradle plugin behaviors. +The IntelliJ Platform Gradle Plugin exposes a number of build features to control some of the low-level Gradle plugin behaviors. To enable or disable a particular feature, add a Project property to the gradle.properties file with the following pattern: ``` @@ -57,7 +57,7 @@ org.jetbrains.intellij.platform.buildFeature.paidPluginSearchableOptionsWarning= ## selfUpdateCheck {#selfUpdateCheck} -Checks whether the currently used Gradle IntelliJ Plugin is outdated and if a new release is available. +Checks whether the currently used IntelliJ Platform Gradle Plugin is outdated and if a new release is available. The plugin performs an update check on every run asking the GitHub Releases page for the redirection URL to the latest version with `HEAD` HTTP request: [](https://github.com/jetbrains/gradle-intellij-plugin/releases/latest). From e67680d82dbcfa23dadae86af9db269e3eca6081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 5 Feb 2024 18:23:49 +0100 Subject: [PATCH 15/54] tools_intellij_platform_gradle_plugin_types.md: edits, review --- ...s_intellij_platform_gradle_plugin_types.md | 26 +++++-------------- v.list | 2 ++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md index e452a6bb4..f336fdc96 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md @@ -9,9 +9,7 @@ ## FailureLevel {#FailureLevel} -``` -org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel -``` +[`VerifyPluginTask.FailureLevel`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) Enum class describing the failure level of the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. @@ -40,9 +38,7 @@ See also: ## IntelliJPlatformType {#IntelliJPlatformType} -``` -org.jetbrains.intellij.platform.gradle.IntelliJPlatformType -``` +[`IntelliJPlatformType`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/IntelliJPlatformType.kt) Describes all IntelliJ Platform types available to be used for plugin development, dependency resolution, and plugin verification. @@ -103,9 +99,7 @@ Throws ## ProductRelease.Channel {#ProductRelease-Channel} -``` -org.jetbrains.intellij.platform.gradle.model.ProductRelease -``` +[`ProductRelease.Channel`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/model/ProductRelease.kt) List of available channels used by JetBrains IDEs and Android Studio for describing binary releases. @@ -128,9 +122,7 @@ See also: ## ProductReleasesValueSource.FilterParameters {#ProductReleasesValueSource-FilterParameters} -``` -org.jetbrains.intellij.platform.gradle.provider.ProductReleasesValueSource -``` +[`ProductReleasesValueSource.FilterParameters`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/provider/ProductReleasesValueSource.kt) Interface that provides a clear way to filter binary product releases for the purposes of IntelliJ Plugin Verifier. @@ -149,11 +141,9 @@ See also: ## Subsystems {#Subsystems} -``` -org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.Subsystems -``` +[`VerifyPluginTask.Subsystems`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) -Specifies which subsystems of IDE should be checked by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. +Specifies which subsystems of the IDE should be checked by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. | Name | Description | |-------------------|----------------------------------------------| @@ -169,9 +159,7 @@ See also: ## VerificationReportsFormats {#VerificationReportsFormats} -``` -org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.VerificationReportsFormats -``` +[`VerifyPluginTask.VerificationReportsFormats`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) Enum class describing the type of the results produced by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. diff --git a/v.list b/v.list index 663e5aa0a..5b49f2216 100644 --- a/v.list +++ b/v.list @@ -19,6 +19,8 @@ + + From f9e06618f38a38edb57e8f2733f66ebcd30f6c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 5 Feb 2024 18:32:20 +0100 Subject: [PATCH 16/54] tools_intellij_platform_gradle_plugin_task_awares.md: add GH links --- ...ntellij_platform_gradle_plugin_task_awares.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md index 37202cf75..4759224f8 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -12,6 +12,8 @@ The Task Awares is a set of interfaces that can be applied to custom Gradle task ## CoroutinesJavaAgentAware {#CoroutinesJavaAgentAware} +[`CoroutinesJavaAgentAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CoroutinesJavaAgentAware.kt) + The interface provides the path to the Java Agent file for the Coroutines library required to enable coroutines debugging. Inherited also by [`RunnableIdeAware`](#RunnableIdeAware). @@ -32,6 +34,8 @@ Default value ## CustomIntelliJPlatformVersionAware {#CustomIntelliJPlatformVersionAware} +[`CustomIntelliJPlatformVersionAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CustomIntelliJPlatformVersionAware.kt) + By default, the project with the IntelliJ Platform Gradle Plugin applied required the presence of the IntelliJ Platform, referred to later by various tasks, configurations, and extensions. The custom IntelliJ Platform concept allows using another version, i.e., to run a guest IDE or tests against it. @@ -80,6 +84,8 @@ Type ## IntelliJPlatformVersionAware {#IntelliJPlatformVersionAware} +[`IntelliJPlatformVersionAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/IntelliJPlatformVersionAware.kt) + This interface provides tasks a possibility for accessing information about the IntelliJ Platform currently used in the project. The [`intelliJPlatformConfiguration`](#IntelliJPlatformVersionAware-intelliJPlatformConfiguration) input property receives a dependency added to the `intellijPlatform` configuration, which eventually is resolved and lets to access the IntelliJ Platform details such as [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) or the path to the IntelliJ Platform directory. @@ -135,6 +141,8 @@ Throws ## PluginVerifierAware {#PluginVerifierAware} +[`PluginVerifierAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/PluginVerifierAware.kt) + The interface provides the path to the IntelliJ Plugin Verifier executable. It is required to have a dependency on the IntelliJ Plugin Verifier added to the project with [`intellijPlatform.pluginVerifier()`](tools_intellij_platform_gradle_plugin_dependencies_extension.md) dependencies extension. @@ -153,6 +161,8 @@ Type ## RunnableIdeAware {#RunnableIdeAware} +[`RunnableIdeAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt) + The interface which utilizes a set of various interfaces required for running a guest IDE. Inherits from: - [`CoroutinesJavaAgentAware`](#CoroutinesJavaAgentAware) - [`RuntimeAware`](#RuntimeAware) @@ -163,6 +173,8 @@ The interface which utilizes a set of various interfaces required for running a ## RuntimeAware {#RuntimeAware} +[`RuntimeAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RuntimeAware.kt) + This interface provides access to the Java Runtime (i.e., JetBrains Runtime) resolved with `RuntimeResolver`. ### runtimeDirectory @@ -199,6 +211,8 @@ Type ## SandboxAware {#SandboxAware} +[`SandboxAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SandboxAware.kt) + The interface provides quick access to the sandbox container and specific directories located within it. The path to the sandbox container is obtained using the [`intellijPlatform.sandboxContainer`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-sandboxContainer) extension property and the type and version of the IntelliJ Platform applied to the project. @@ -271,6 +285,8 @@ Type ## SigningAware {#SigningAware} +[`SigningAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SigningAware.kt) + The interface provides the path to the Marketplace ZIP Signer executable. It is required to have a dependency on the Marketplace ZIP Signer added to the project with [`intellijPlatform.zipSigner()`](tools_intellij_platform_gradle_plugin_dependencies_extension.md) dependencies extension. From 405f561bdd9064afea75f4b07d5d4c24aa530b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 11:36:38 +0100 Subject: [PATCH 17/54] tools_intellij_platform_gradle_plugin.md: minor --- .../tools_intellij_platform_gradle_plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index f21f3c603..5ff02a0e5 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -20,7 +20,7 @@ It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ i -> This plugin is currently in **Early Access** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)). +> IntelliJ Platform Gradle Plugin 2.x is currently in **Early Access** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)). > Please report bugs or problems in GitHub issue tracker or Slack channel (see [here](tools_intellij_platform_gradle_plugin.md#tldr)). > > Any documentation issues on this page should be reported using the feedback form on the bottom of this page. From 1385720c4f76d856158a6f9085184db47f02d82b Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 6 Feb 2024 11:44:25 +0100 Subject: [PATCH 18/54] IntelliJ Platform Gradle Plugin: `buildPlugin` task --- .../tools_intellij_platform_gradle_plugin.md | 21 ++++------ ...llij_platform_gradle_plugin_task_awares.md | 16 ++++---- ...s_intellij_platform_gradle_plugin_tasks.md | 41 +++++++++++++++---- ...s_intellij_platform_gradle_plugin_types.md | 12 +++--- v.list | 2 +- 5 files changed, 54 insertions(+), 38 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 5ff02a0e5..b0d9c249d 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -70,29 +70,25 @@ The plugin was split into subplugins that can be applied separately. This allows for applying only a subset of features, e.g. when you only use an IntelliJ Platform SDK dependency without creating any tasks. #### org.jetbrains.intellij.platform - -{id="plugin.platform"} +{#plugin.platform} This plugin applies all project-level plugins, which brings the fully-flagged tooling for plugin development for IntelliJ-based IDEs. It includes [](#plugin.core) and [](#plugin.tasks) subplugins. #### org.jetbrains.intellij.platform.core - -{id="plugin.core"} +{#plugin.core} The base plugin sets up all the custom configurations and transforms needed to manage the IntelliJ Platform SDK, JetBrains Runtime, CLI tools, and other plugins when they're added as dependencies. #### org.jetbrains.intellij.platform.tasks - -{id="plugin.tasks"} +{#plugin.tasks} Tasks plugin registers and preconfigures all tasks introduced by the IntelliJ Platform Gradle Plugin. It can be omitted when referring to any IntelliJ Platform SDK dependencies without invoking tasks on project submodules. #### org.jetbrains.intellij.platform.settings - -{id="plugin.settings"} +{#plugin.settings} If you define repositories within the settings.gradle.kts using the `dependencyResolutionManagement` Gradle, make sure to include the Settings plugin in your settings.gradle.kts. @@ -103,8 +99,7 @@ If you define repositories within the settings.gradle.kts using the {title="Exploring Configuration Options"} ### Setting Up Repositories - -{id="configuration.repositories"} +{#configuration.repositories} All IntelliJ Platform SDK artifacts are available via IntelliJ Maven repositories (see [](intellij_artifacts.md)), which exist in three variants: @@ -140,8 +135,7 @@ The `intellijPlatform` extension available for the `repositories {}` provides th | `recommended` | Applies a set of recommended repositories. | #### Dependency Resolution Management - -{id="configuration.dependencyResolutionManagement"} +{#configuration.dependencyResolutionManagement} To access the IntelliJ Platform Gradle Plugin within the settings.gradle.kts to use with `dependencyResolutionManagement`, add: @@ -166,8 +160,7 @@ dependencyResolutionManagement { ``` #### Cache Redirector - -{id="configuration.cacheRedirector"} +{#configuration.cacheRedirector} Some repositories, by default, point to JetBrains Cache Redirector to provide better resources resolution. However, it is possible to use the direct repository URL, if available. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md index 4759224f8..cd99075b3 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -12,7 +12,7 @@ The Task Awares is a set of interfaces that can be applied to custom Gradle task ## CoroutinesJavaAgentAware {#CoroutinesJavaAgentAware} -[`CoroutinesJavaAgentAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CoroutinesJavaAgentAware.kt) +[`CoroutinesJavaAgentAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CoroutinesJavaAgentAware.kt) The interface provides the path to the Java Agent file for the Coroutines library required to enable coroutines debugging. @@ -34,7 +34,7 @@ Default value ## CustomIntelliJPlatformVersionAware {#CustomIntelliJPlatformVersionAware} -[`CustomIntelliJPlatformVersionAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CustomIntelliJPlatformVersionAware.kt) +[`CustomIntelliJPlatformVersionAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CustomIntelliJPlatformVersionAware.kt) By default, the project with the IntelliJ Platform Gradle Plugin applied required the presence of the IntelliJ Platform, referred to later by various tasks, configurations, and extensions. @@ -84,7 +84,7 @@ Type ## IntelliJPlatformVersionAware {#IntelliJPlatformVersionAware} -[`IntelliJPlatformVersionAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/IntelliJPlatformVersionAware.kt) +[`IntelliJPlatformVersionAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/IntelliJPlatformVersionAware.kt) This interface provides tasks a possibility for accessing information about the IntelliJ Platform currently used in the project. @@ -141,7 +141,7 @@ Throws ## PluginVerifierAware {#PluginVerifierAware} -[`PluginVerifierAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/PluginVerifierAware.kt) +[`PluginVerifierAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/PluginVerifierAware.kt) The interface provides the path to the IntelliJ Plugin Verifier executable. @@ -161,7 +161,7 @@ Type ## RunnableIdeAware {#RunnableIdeAware} -[`RunnableIdeAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt) +[`RunnableIdeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt) The interface which utilizes a set of various interfaces required for running a guest IDE. Inherits from: - [`CoroutinesJavaAgentAware`](#CoroutinesJavaAgentAware) @@ -173,7 +173,7 @@ The interface which utilizes a set of various interfaces required for running a ## RuntimeAware {#RuntimeAware} -[`RuntimeAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RuntimeAware.kt) +[`RuntimeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RuntimeAware.kt) This interface provides access to the Java Runtime (i.e., JetBrains Runtime) resolved with `RuntimeResolver`. @@ -211,7 +211,7 @@ Type ## SandboxAware {#SandboxAware} -[`SandboxAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SandboxAware.kt) +[`SandboxAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SandboxAware.kt) The interface provides quick access to the sandbox container and specific directories located within it. @@ -285,7 +285,7 @@ Type ## SigningAware {#SigningAware} -[`SigningAware`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SigningAware.kt) +[`SigningAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SigningAware.kt) The interface provides the path to the Marketplace ZIP Signer executable. diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 191e24e68..21f986618 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -6,23 +6,46 @@ +The IntelliJ Platform Gradle Plugin introduces a set of tasks to handle activities of the plugin development for IntelliJ-based IDEs, such as building, verifying, testing, and publishing the output archive. + +Tasks are applied to the project with the [`org.jetbrains.intellij.platform.tasks`](tools_intellij_platform_gradle_plugin.md#plugin.tasks), which is a part of [`org.jetbrains.intellij.platform`](tools_intellij_platform_gradle_plugin.md#plugin.platform). + +Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. + +```mermaid +graph TD + buildPlugin + jarSearchableOptions + prepareSandbox + + jarSearchableOptions & prepareSandbox --> buildPlugin + + click buildPlugin "#buildPlugin" + click jarSearchableOptions "#jarSearchableOptions" + click prepareSandbox "#prepareSandbox" +``` + ## buildPlugin {#buildPlugin} -This class represents a task for building a plugin and preparing a ZIP archive for deployment. + -It uses the content produced by [`prepareSandbox`](#prepareSandbox) and [`jarSearchableOptions`](#jarSearchableOptions) tasks as an input. +**Sources**: [`BuildPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildPluginTask.kt) + +**Extends**: [`Zip`](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html) + +**Depends on**: [`jarSearchableOptions`](#jarSearchableOptions), [`prepareSandbox`](#prepareSandbox) + + -### archiveBaseName -{#buildPlugin-archiveBaseName} +A task responsible for building plugin and preparing a ZIP archive for testing and deployment. -{style="narrow"} -Type -: `Property` +It takes the output of the [`prepareSandbox`](#prepareSandbox) task containing the built project with all its modules and dependencies, and the output of [`jarSearchableOptions`](#jarSearchableOptions) task. -Default value -: [`prepareSandbox.pluginName`](#prepareSandbox-pluginName) +The produced archive is stored in the [buildDirectory]/distributions/[`archiveFile`](#buildPlugin-archiveFile) file. +The [`archiveFile`](#buildPlugin-archiveFile) name and location can be controlled with properties provided with the [`Zip`](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html) base task. +By default, the `archiveBaseName` is set to the value of [`prepareSandbox.pluginName`](#prepareSandbox-pluginName). ### archiveFile diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md index f336fdc96..83db49965 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md @@ -9,7 +9,7 @@ ## FailureLevel {#FailureLevel} -[`VerifyPluginTask.FailureLevel`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) +[`VerifyPluginTask.FailureLevel`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) Enum class describing the failure level of the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. @@ -38,7 +38,7 @@ See also: ## IntelliJPlatformType {#IntelliJPlatformType} -[`IntelliJPlatformType`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/IntelliJPlatformType.kt) +[`IntelliJPlatformType`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/IntelliJPlatformType.kt) Describes all IntelliJ Platform types available to be used for plugin development, dependency resolution, and plugin verification. @@ -99,7 +99,7 @@ Throws ## ProductRelease.Channel {#ProductRelease-Channel} -[`ProductRelease.Channel`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/model/ProductRelease.kt) +[`ProductRelease.Channel`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/model/ProductRelease.kt) List of available channels used by JetBrains IDEs and Android Studio for describing binary releases. @@ -122,7 +122,7 @@ See also: ## ProductReleasesValueSource.FilterParameters {#ProductReleasesValueSource-FilterParameters} -[`ProductReleasesValueSource.FilterParameters`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/provider/ProductReleasesValueSource.kt) +[`ProductReleasesValueSource.FilterParameters`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/provider/ProductReleasesValueSource.kt) Interface that provides a clear way to filter binary product releases for the purposes of IntelliJ Plugin Verifier. @@ -141,7 +141,7 @@ See also: ## Subsystems {#Subsystems} -[`VerifyPluginTask.Subsystems`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) +[`VerifyPluginTask.Subsystems`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) Specifies which subsystems of the IDE should be checked by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. @@ -159,7 +159,7 @@ See also: ## VerificationReportsFormats {#VerificationReportsFormats} -[`VerifyPluginTask.VerificationReportsFormats`](%gh-ipgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) +[`VerifyPluginTask.VerificationReportsFormats`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) Enum class describing the type of the results produced by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task. diff --git a/v.list b/v.list index 5b49f2216..8148169eb 100644 --- a/v.list +++ b/v.list @@ -19,7 +19,7 @@ - + From 2cf820cb1fc06c3f7e55cd3993f3063ddb8bacbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 12:18:33 +0100 Subject: [PATCH 19/54] tools_intellij_platform_gradle_plugin_dependencies_extension.md: rework --- .../tools_intellij_platform_gradle_plugin.md | 22 +--- ...rm_gradle_plugin_dependencies_extension.md | 118 ++++++++++++------ 2 files changed, 84 insertions(+), 56 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index b0d9c249d..c22981870 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -189,26 +189,11 @@ dependencies { } ``` -The `intellijIdeaCommunity` in the previous sample is one of extension functions available for adding IntelliJ Platform dependencies to the project. -Other IDEs can be targeted using one the extensions listed in the table below. - -| Extension | Target IDE | -|-------------------------|--------------------------------------------| -| `androidStudio` | [Android Studio](android_studio.md) | -| `clion` | [CLion](clion.md) | -| `fleetBackend` | Fleet Backend | -| `gateway` | Gateway | -| `goland` | [GoLand](goland.md) | -| `intellijIdeaCommunity` | [IntelliJ IDEA Community Edition](idea.md) | -| `intellijIdeaUltimate` | [](idea_ultimate.md) | -| `phpstorm` | [PhpStorm](phpstorm.md) | -| `pycharmCommunity` | [PyCharm Community Edition](pycharm.md) | -| `pycharmProfessional` | [PyCharm Professional](pycharm.md) | -| `rider` | [Rider](rider.md) | -| `rustRover` | Rust Rover | -| `writerside` | Writerside | +The `intellijIdeaCommunity` in the previous sample is one of the extension functions available for adding IntelliJ Platform dependencies to the project. +See [](tools_intellij_platform_gradle_plugin_dependencies_extension.md) on how to target other IDEs. #### Parametrize IntelliJ Platform Dependency +{id="dependenciesParametrizePlatform"} As a fallback, `intellijPlatform` extension can be used to allow dynamic configuration of the target platform, e.g., via gradle.properties: @@ -245,6 +230,7 @@ dependencies { ``` #### Local IntelliJ Platform IDE Instance +{id="dependenciesLocalPlatform"} It is possible to refer to the locally available IntelliJ-based IDE using the `local` helper function: diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md index 4c3d487b0..88ffa4589 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -10,64 +10,106 @@ Extension class for managing IntelliJ Platform dependencies in a Gradle build sc This class provides methods for adding dependencies to different IntelliJ Platform products and managing local dependencies. -It also includes methods for adding JetBrains Runtime, IntelliJ Platform plugins, IntelliJ Platform bundled plugins, IntelliJ Plugin Verifier, and Marketplace ZIP Signer. +It also includes methods for adding IntelliJ Platform plugins, IntelliJ Platform bundled plugins, JetBrains Runtime, as well as IntelliJ Plugin Verifier and Marketplace ZIP Signer tools. + +> Corresponding required repositories must be defined in `repositories {}` section, see [](tools_intellij_platform_gradle_plugin_repositories_extension.md). +> +{style="note"} **Example:** -```kotlin -import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType +- setup Maven Central and `recommended()` [repositories](tools_intellij_platform_gradle_plugin_repositories_extension.md) +- target IntelliJ IDEA Community %ijPlatform% +- add dependency on bundled Java plugin +- add IntelliJ Plugin Verifier and Marketplace ZIP Signer CLI tools -dependencies { - // ... +```kotlin +repositories { + + mavenCentral() intellijPlatform { - // ... + recommended() + } +} + +dependencies { + + intellijPlatform { + intellijIdeaCommunity("%ijPlatform%") - create(IntelliJPlatformType.PhpStorm, "2023.3") - create("PS", "2023.3") - intellijIdeaCommunity("2023.3") - local(file("/path/to/ide/")) - jetbrainsRuntime("...") - plugin("org.intellij.scala") bundledPlugin("com.intellij.java") + pluginVerifier() zipSigner() } + + // other dependencies, e.g., 3rd-party libraries } ``` -> Just one IntelliJ Platform dependency can be added to the project at the time. +> Just one IntelliJ Platform dependency can be added to the project at a time. > {style="warning"} -| Function | Description | -|----------------------------------------------------------------------------------------|----------------------------------------------------------------| -| `create(type, version)` | Adds a dependency on the IntelliJ Platform. | -| `androidStudio(version)` | Adds a dependency on Android Studio. | -| `clion(version)` | Adds a dependency on CLion. | -| `fleetBackend(version)` | Adds a dependency on Fleet Backend. | -| `gateway(version)` | Adds a dependency on Gateway. | -| `goland(version)` | Adds a dependency on GoLand. | -| `intellijIdeaCommunity(version)` | Adds a dependency on IntelliJ IDEA Community. | -| `intellijIdeaUltimate(version)` | Adds a dependency on IntelliJ IDEA Ultimate. | -| `phpstorm(version)` | Adds a dependency on PhpStorm. | -| `pycharmCommunity(version)` | Adds a dependency on PyCharm Community. | -| `pycharmProfessional(version)` | Adds a dependency on PyCharm Professional. | -| `rider(version)` | Adds a dependency on Rider. | -| `rustRover(version)` | Adds a dependency on Rust Rover. | -| `writerside(version)` | Adds a dependency on Writerside. | -| `local(localPath)` | Adds a local dependency on a local IntelliJ Platform instance. | -| `jetbrainsRuntime(version, variant, architecture)` `jetbrainsRuntime(explicitVersion)` | Adds a dependency on JetBrains Runtime. | -| `plugin(id, version, channel)` | Adds a dependency on a plugin for IntelliJ Platform. | -| `bundledPlugin(id)` | Adds a dependency on a bundled IntelliJ Platform plugin. | -| `pluginVerifier(version)` | Adds a dependency on IntelliJ Plugin Verifier. | -| `zipSigner(version)` | Adds a dependency on Marketplace ZIP Signer. | +### Default Target Platforms + +See [](#custom-target-platforms) for non-default targets. + +| Function | Description | +|----------------------------------|------------------------------------------------------------------| +| `androidStudio(version)` | Adds a dependency on [Android Studio](android_studio.md). | +| `clion(version)` | Adds a dependency on [CLion](clion.md). | +| `fleetBackend(version)` | Adds a dependency on Fleet Backend. | +| `gateway(version)` | Adds a dependency on Gateway. | +| `goland(version)` | Adds a dependency on [GoLand](goland.md). | +| `intellijIdeaCommunity(version)` | Adds a dependency on [IntelliJ IDEA Community](idea.md). | +| `intellijIdeaUltimate(version)` | Adds a dependency on [IntelliJ IDEA Ultimate](idea_ultimate.md). | +| `phpstorm(version)` | Adds a dependency on [PhpStorm](phpstorm.md). | +| `pycharmCommunity(version)` | Adds a dependency on [PyCharm Community](pycharm.md). | +| `pycharmProfessional(version)` | Adds a dependency on [PyCharm Professional](pycharm.md). | +| `rider(version)` | Adds a dependency on [Rider](rider.md). | +| `rustRover(version)` | Adds a dependency on Rust Rover. | +| `writerside(version)` | Adds a dependency on Writerside. | + +### Custom Target Platforms + +| Function | Description | +|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| +| `create(type, version)` | Adds a configurable dependency on the IntelliJ Platform. See [](tools_intellij_platform_gradle_plugin.md#dependenciesParametrizePlatform). | +| `local(localPath)` | Adds a dependency on a local IntelliJ Platform instance. See [](tools_intellij_platform_gradle_plugin.md#dependenciesLocalPlatform). | See also: -- [](verifying_plugin_compatibility.md) -- [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) -- [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) + - [Types: `IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) +### Plugins + +| Function | Description | +|--------------------------------|----------------------------------------------------------| +| `plugin(id, version, channel)` | Adds a dependency on a plugin for IntelliJ Platform. | +| `bundledPlugin(id)` | Adds a dependency on a bundled IntelliJ Platform plugin. | + +See also: + +- [](plugin_dependencies.md) + +### Tools + +| Function | Description | +|---------------------------|-------------------------------------------------------------------------------------| +| `pluginVerifier(version)` | Adds a dependency on [IntelliJ Plugin Verifier](verifying_plugin_compatibility.md). | +| `zipSigner(version)` | Adds a dependency on [Marketplace ZIP Signer](plugin_signing.md). | + +See also: + +- [](verifying_plugin_compatibility.md), [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) +- [](plugin_signing.md), [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) + +### Java Runtime + +| Function | Description | +|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| +|

`jetbrainsRuntime(version, variant, architecture)`

`jetbrainsRuntime(explicitVersion)`

| Adds a dependency on [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance). | From 6258e118ea8389163794dd1aee6d3256ec489bac Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 6 Feb 2024 13:47:42 +0100 Subject: [PATCH 20/54] IntelliJ Platform Gradle Plugin: `buildSearchableOptions` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 64 +++++++++++++++++-- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 21f986618..bba2c0e1e 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -13,16 +13,25 @@ Tasks are applied to the project with the [`org.jetbrains.intellij.platform.task Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. ```mermaid -graph TD +flowchart TD buildPlugin + buildSearchableOptions jarSearchableOptions + patchPluginXml prepareSandbox jarSearchableOptions & prepareSandbox --> buildPlugin + patchPluginXml --> buildSearchableOptions click buildPlugin "#buildPlugin" + click buildSearchableOptions "#buildSearchableOptions" click jarSearchableOptions "#jarSearchableOptions" + click patchPluginXml "#patchPluginXml" click prepareSandbox "#prepareSandbox" + + style jarSearchableOptions fill:#eee + style patchPluginXml fill:#eee + style prepareSandbox fill:#eee ``` ## buildPlugin @@ -32,13 +41,12 @@ graph TD **Sources**: [`BuildPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildPluginTask.kt) -**Extends**: [`Zip`](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html) +**Extends**: [`Zip`][gradle-zip-task] **Depends on**: [`jarSearchableOptions`](#jarSearchableOptions), [`prepareSandbox`](#prepareSandbox)
- A task responsible for building plugin and preparing a ZIP archive for testing and deployment. It takes the output of the [`prepareSandbox`](#prepareSandbox) task containing the built project with all its modules and dependencies, and the output of [`jarSearchableOptions`](#jarSearchableOptions) task. @@ -64,9 +72,50 @@ Default value ## buildSearchableOptions {#buildSearchableOptions} -See also: -- [Extension: `intellijPlatform.buildSearchableOptions`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions) -- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) + + +**Sources**: [`BuildSearchableOptionsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildSearchableOptionsTask.kt) + +**Extends**: [`JavaExec`][gradle-javaexec-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware) + +**Depends on**: [`patchPluginXml`](#patchPluginXml) + + + +Builds the index of UI components (searchable options) for the plugin. +This task runs a headless IDE instance to collect all the available options provided by the plugin's [](settings.md). + +If your plugin doesn't implement custom settings, it is recommended to disable it with [`intellijPlatform.buildSearchableOptions`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions). + +In the case of running the task for the plugin which has the [`intellijPlatform.pluginConfiguration.productDescriptor`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor) configures, a warning will be logged regarding potential issues with running headless IDE for paid plugins. +It is possible to mute this warning with the [`paidPluginSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#paidPluginSearchableOptionsWarning) build feature. + + +### outputDirectory +{#buildSearchableOptions-outputDirectory} + +The directory to which searchable options will be generated. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [buildDirectory]/searchableOptions + + +### showPaidPluginWarning +{#buildSearchableOptions-showPaidPluginWarning} + +Emit warning if the task is executed by a paid plugin. +Can be disabled with the [`paidPluginSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#paidPluginSearchableOptionsWarning) build feature. + +{style="narrow"} +Type +: `Property` + +Default value +: [`paidPluginSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#paidPluginSearchableOptionsWarning) && `productDescriptor` is defined ## classpathIndexCleanup @@ -1070,3 +1119,6 @@ Default value + +[gradle-javaexec-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec +[gradle-zip-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html From 54cc6883b8e7771136ca3d13d25f190e9ceec367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 15:11:45 +0100 Subject: [PATCH 21/54] tools_intellij_platform_gradle_plugin_dependencies_extension.md: fix heading levels --- ...ij_platform_gradle_plugin_dependencies_extension.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md index 88ffa4589..08f116b09 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -52,7 +52,7 @@ dependencies { > {style="warning"} -### Default Target Platforms +## Default Target Platforms See [](#custom-target-platforms) for non-default targets. @@ -72,7 +72,7 @@ See [](#custom-target-platforms) for non-default targets. | `rustRover(version)` | Adds a dependency on Rust Rover. | | `writerside(version)` | Adds a dependency on Writerside. | -### Custom Target Platforms +## Custom Target Platforms | Function | Description | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------| @@ -83,7 +83,7 @@ See also: - [Types: `IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) -### Plugins +## Plugins | Function | Description | |--------------------------------|----------------------------------------------------------| @@ -94,7 +94,7 @@ See also: - [](plugin_dependencies.md) -### Tools +## Tools | Function | Description | |---------------------------|-------------------------------------------------------------------------------------| @@ -106,7 +106,7 @@ See also: - [](verifying_plugin_compatibility.md), [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) - [](plugin_signing.md), [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin) -### Java Runtime +## Java Runtime | Function | Description | |-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| From 3306c129a6b2cd3f2d488b0372059d9aac41543f Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 6 Feb 2024 15:28:57 +0100 Subject: [PATCH 22/54] IntelliJ Platform Gradle Plugin: `initializeIntelliJPlatformPlugin` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 50 ++++++++++++++----- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index bba2c0e1e..053d5c367 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -14,24 +14,35 @@ Each of the tasks has relations described between each other, inherit from [](to ```mermaid flowchart TD - buildPlugin - buildSearchableOptions - jarSearchableOptions - patchPluginXml - prepareSandbox + subgraph ALL ["` `"] + buildPlugin + buildSearchableOptions + jarSearchableOptions + patchPluginXml + prepareSandbox - jarSearchableOptions & prepareSandbox --> buildPlugin - patchPluginXml --> buildSearchableOptions + jarSearchableOptions & prepareSandbox --> buildPlugin + patchPluginXml --> buildSearchableOptions + end + + classpathIndexCleanup + initializeIntelliJPlatformPlugin --> ALL click buildPlugin "#buildPlugin" click buildSearchableOptions "#buildSearchableOptions" + click classpathIndexCleanup "#classpathIndexCleanup" + click initializeIntelliJPlatformPlugin "#initializeIntelliJPlatformPlugin" click jarSearchableOptions "#jarSearchableOptions" click patchPluginXml "#patchPluginXml" click prepareSandbox "#prepareSandbox" + style classpathIndexCleanup fill:#eee,stroke-dasharray: 5 5 style jarSearchableOptions fill:#eee style patchPluginXml fill:#eee style prepareSandbox fill:#eee + style prepareSandbox fill:#eee + + style ALL fill:#fff,stroke:#eee ``` ## buildPlugin @@ -129,7 +140,24 @@ Default value ## initializeIntelliJPlatformPlugin {#initializeIntelliJPlatformPlugin} -Initializes the IntelliJ Platform Gradle Plugin and performs various checks, like if the plugin is up-to-date. + + +**Sources**: [`InitializeIntelliJPlatformPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/InitializeIntelliJPlatformPluginTask.kt) + +**Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) + + + +This task is executed before every other task introduced by IntelliJ Platform Gradle Plugin to prepare it to run. + +It is responsible for: +- checking if the project uses IntelliJ Platform Gradle Plugin in the latest available version, +- preparing the KotlinX Coroutines Java Agent file to enable coroutines debugging when developing the plugin. + +The self-update check can be disabled with [`selfUpdateCheck`](tools_intellij_platform_gradle_plugin_build_features.md#selfUpdateCheck) build feature. + +To make the Coroutines Java Agent available for the task, inherit from [`CoroutinesJavaAgentAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CoroutinesJavaAgentAware). + ### offline {#initializeIntelliJPlatformPlugin-offline} @@ -160,7 +188,7 @@ Type : `Property` Default value -: [Build Features: `selfUpdateCheck`](tools_intellij_platform_gradle_plugin_build_features.md#selfUpdateCheck) +: [`selfUpdateCheck`](tools_intellij_platform_gradle_plugin_build_features.md#selfUpdateCheck) ### selfUpdateLock @@ -186,9 +214,6 @@ Type Default value : `[buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar` -See also: -- [Task Awares: `CoroutinesJavaAgentAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CoroutinesJavaAgentAware) - ### pluginVersion {#initializeIntelliJPlatformPlugin-pluginVersion} @@ -1120,5 +1145,6 @@ Default value +[gradle-default-task]: https://docs.gradle.org/current/dsl/org.gradle.api.DefaultTask.html [gradle-javaexec-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec [gradle-zip-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html From 9ee6e71a4536e9ff768f6822e5e868683468c622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 15:30:46 +0100 Subject: [PATCH 23/54] tools_intellij_platform_gradle_plugin.md: remove "Tasks" section --- .../tools_intellij_platform_gradle_plugin.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index c22981870..43145c9cb 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -255,10 +255,6 @@ Note that the `ivy` entry needs to be added to the `repositories {}` block as al TODO -## Tasks - -TODO - ## Migration FAQ ### Unresolved 'idea' Plugin From b88d67855f9fb117c20cbde9d5962293cf5e4caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 17:17:46 +0100 Subject: [PATCH 24/54] tools_intellij_platform_gradle_plugin_repositories_extension.md: rework --- .../tools_intellij_platform_gradle_plugin.md | 22 ++--- ...rm_gradle_plugin_repositories_extension.md | 80 ++++++++++++++----- 2 files changed, 65 insertions(+), 37 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 43145c9cb..246d2d445 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -107,7 +107,11 @@ All IntelliJ Platform SDK artifacts are available via IntelliJ Maven repositorie - snapshots - nightly (only selected artifacts) -Assume you want to build your plugin against a release version of the IntelliJ Platform and you also have a dependency on a plugin from the Marketplace, then you would declare the following repositories: + + +**Example #2:** + +Build a plugin against a release version of the IntelliJ Platform with dependency on a plugin from the JetBrains Marketplace: ```kotlin repositories { @@ -120,19 +124,7 @@ repositories { } ``` -The `intellijPlatform` extension available for the `repositories {}` provides the following helper methods for adding repositories: - -| Name | Description | -|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------| -| `releases` | IntelliJ Platform Releases repository. | -| `snapshots` | IntelliJ Platform Snapshots repository. | -| `nightly` | IntelliJ Platform Nightly repository, not available publicly. | -| `ivy` | Local Ivy repository for resolving local Ivy XML files used for describing artifacts like local IntelliJ Platform instance, bundled plugins, etc. | -| `marketplace` | JetBrains Marketplace Repository, hosts plugins for IntelliJ-based IDEs. | -| `jetbrainsRuntime` | JetBrains Runtime (JBR), CloudFront-based hosting from which specific JBR releases are fetched, if explicitly requested. | -| `binaryReleasesAndroidStudio` | Android Studio Binary Releases, required when running IntelliJ Plugin Verifier against Android Studio releases. | -| `binaryReleases` | IntelliJ IDEA Binary Releases, required when running IntelliJ Plugin Verifier against JetBrains IntelliJ-based IDE releases. | -| `recommended` | Applies a set of recommended repositories. | +See [](tools_intellij_platform_gradle_plugin_repositories_extension.md) on how to configure additional repositories. #### Dependency Resolution Management {#configuration.dependencyResolutionManagement} @@ -169,7 +161,7 @@ To switch off the default usage of JetBrains Cache Redirector, see the [](tools_ ### Setting Up IntelliJ Platform -Dependencies and [repositories](#configuration.repositories) are handled using explicit entries within `dependencies {}` and `repositories {}` blocks in build.gradle.kts file. +Dependencies and [repositories](#configuration.repositories) are handled using explicit entries within `dependencies {}` and `repositories {}` blocks in build.gradle.kts file. A minimum configuration for targeting IntelliJ IDEA Community 2023.3: diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md index 8edf417d4..95dd2eb76 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md @@ -19,39 +19,75 @@ It provides methods to add: - Android Studio and IntelliJ Platform binary release repositories (for IntelliJ Plugin Verifier) - Ivy local repository (for correct access to local dependencies) + + +> In most cases, simply using [`recommended()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#recommended) repository will be sufficient. +> +{style="tip"} + **Example:** +Setup Maven Central and [`recommended()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#recommended) repositories: + ```kotlin repositories { - // ... + mavenCentral() intellijPlatform { - // ... - - releases() - snapshots() - nightly() - marketplace() - jetbrainsRuntime() - binaryReleasesAndroidStudio() - binaryReleases() - ivy() recommended() } } ``` -| Function | Description | -|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `releases()` | Adds a repository for accessing IntelliJ Platform stable releases. | -| `snapshots()` | Adds a repository for accessing IntelliJ Platform snapshot releases. | -| `nightly()` | Adds a repository for accessing IntelliJ Platform nightly releases. | -| `marketplace()` | Adds a repository for accessing plugins hosted on JetBrains Marketplace. | -| `jetbrainsRuntime()` | Adds a repository for accessing JetBrains Runtime releases. | -| `binaryReleasesAndroidStudio()` | Adds a repository for accessing Android Studio binary releases. | -| `binaryReleases()` | Adds a repository for accessing IntelliJ Platform binary releases. | -| `ivy()` | Adds a local Ivy repository for resolving local Ivy XML files used for describing artifacts like local IntelliJ Platform instance, bundled plugins, and other dependencies that utilize `createIvyDependency`. | -| `recommended()` | Applies a set of recommended repositories. | + +## Recommended + +The default repository definition suitable for most plugins. + +| Function | Description | +|-----------------|--------------------------------------------| +| `recommended()` | Applies a set of recommended repositories. | + +It includes: + +- `releases()`, `snapshots()` +- `marketplace()` +- `jetbrainsRuntime()` +- `binaryReleases()`, `binaryReleasesAndroidStudio()` + +## IDE Releases + +| Function | Description | +|---------------|---------------------------------------------------------------------------------------------| +| `releases()` | Adds a repository for accessing IntelliJ Platform stable releases. | +| `snapshots()` | Adds a repository for accessing IntelliJ Platform snapshot releases. | +| `nightly()` | Adds a repository for accessing IntelliJ Platform nightly releases, not available publicly. | + +See also: +- [](intellij_artifacts.md) + +## Binary IDE Releases + +| Function | Description | +|---------------------------------|--------------------------------------------------------------------------------------------------------------| +| `binaryReleases()` | Adds a repository for accessing IntelliJ Platform IDE binary releases for use with IntelliJ Plugin Verifier. | +| `binaryReleasesAndroidStudio()` | Adds a repository for accessing Android Studio binary releases for use with IntelliJ Plugin Verifier. | + +See also: + +- [](verifying_plugin_compatibility.md) + +## Additional Repositories + +| Function | Description | +|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `ivy()` | Adds a local [Ivy](https://ant.apache.org/ivy/) repository for resolving local Ivy XML files used for describing artifacts like [local IntelliJ Platform instance](tools_intellij_platform_gradle_plugin.md#dependenciesLocalPlatform), bundled plugins, and other dependencies that utilize `createIvyDependency`. | +| `jetbrainsRuntime()` | Adds a repository for accessing [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance) releases. | +| `marketplace()` | Adds a repository for accessing plugins hosted on [JetBrains Marketplace](https://plugins.jetbrains.com). | + +See also: + +- [](plugin_dependencies.md) From 3af9e5b182e0242d0b465c6a1022e5f2ffceb77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 17:20:41 +0100 Subject: [PATCH 25/54] move to migration page --- .../tools_intellij_platform_gradle_plugin.md | 13 +++---------- ...ols_intellij_platform_gradle_plugin_migration.md | 8 ++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 246d2d445..71033be40 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -18,6 +18,9 @@ The _IntelliJ Platform Gradle Plugin 2.x_ is a plugin for the Gradle build syste It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ in the future. +> See [](tools_intellij_platform_gradle_plugin_migration.md) for FAQ. +> + > IntelliJ Platform Gradle Plugin 2.x is currently in **Early Access** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)). @@ -247,14 +250,4 @@ Note that the `ivy` entry needs to be added to the `repositories {}` block as al TODO -## Migration FAQ - -### Unresolved 'idea' Plugin - -Add an explicit dependency on the plugin in build.gradle.kts: - -```kotlin -id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" -``` - diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md index 21d752bf8..bab7d3d03 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md @@ -46,5 +46,13 @@ To completely drop this approach, it is mandatory to remove its reference manual +## Unresolved 'idea' Plugin + +Add an explicit dependency on the plugin in build.gradle.kts: + +```kotlin +id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" +``` + From 232081475304210b925e489704852524107e7c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 6 Feb 2024 17:55:17 +0100 Subject: [PATCH 26/54] tools_intellij_platform_gradle_plugin_migration.md: Gradle version section --- .../tools_intellij_platform_gradle_plugin_migration.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md index bab7d3d03..6ea77d647 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md @@ -23,9 +23,10 @@ plugins { } ``` -## Minimal Gradle version +## Minimum Gradle version -The minimal required Gradle version is now `8.0`. See also [](tools_intellij_platform_gradle_plugin.md#requirements). +The minimum required Gradle version is now `8.0`, see [Gradle Installation](https://gradle.org/install/) guide on how to upgrade. +See also [](tools_intellij_platform_gradle_plugin.md#requirements). ## `intellij` extension From a878d0dd8494454ee87959d91cbc284d48672e3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 7 Feb 2024 11:14:58 +0100 Subject: [PATCH 27/54] tools_intellij_platform_gradle_plugin_migration.md: clarify `idea-ext` plugin --- ...ols_intellij_platform_gradle_plugin_migration.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md index 6ea77d647..a83b8b5af 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_migration.md @@ -1,4 +1,4 @@ - + # Migration Guide from Gradle IntelliJ Plugin @@ -47,13 +47,12 @@ To completely drop this approach, it is mandatory to remove its reference manual -## Unresolved 'idea' Plugin +## Unresolved 'idea-ext' Plugin -Add an explicit dependency on the plugin in build.gradle.kts: +Add an explicit dependency on [the plugin](https://github.com/JetBrains/gradle-idea-ext-plugin) in build.gradle.kts: ```kotlin -id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" +plugins { + id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7" +} ``` - - - From 70d7ec2cac1e214cb4bc13754c790cb98fabfa67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 7 Feb 2024 16:00:06 +0100 Subject: [PATCH 28/54] tools_intellij_platform_gradle_plugin.md: minor --- .../tools_intellij_platform_gradle_plugin.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 71033be40..83311451a 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -6,7 +6,7 @@ -**Current Release**: Early Access Preview +**Current Release**: %intellij-platform-gradle-plugin-version% (Early Access Preview) **GitHub**: [Releases & Changelog](https://github.com/JetBrains/gradle-intellij-plugin/releases), [Issue Tracker](https://github.com/JetBrains/gradle-intellij-plugin/issues) @@ -23,10 +23,11 @@ It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ i -> IntelliJ Platform Gradle Plugin 2.x is currently in **Early Access** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)). -> Please report bugs or problems in GitHub issue tracker or Slack channel (see [here](tools_intellij_platform_gradle_plugin.md#tldr)). +> IntelliJ Platform Gradle Plugin 2.x is currently in **Early Access Preview** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)). +> Please report bugs or problems in the GitHub issue tracker or Slack channel (see [here](tools_intellij_platform_gradle_plugin.md#tldr)). > -> Any documentation issues on this page should be reported using the feedback form on the bottom of this page. +> Any documentation issues should be reported using the feedback form on the bottom of this page. +> Please leave your email in case we need more details. > > Thanks a lot in advance for your feedback! > @@ -232,7 +233,6 @@ It is possible to refer to the locally available IntelliJ-based IDE using the `l ```kotlin repositories { intellijPlatform { - ... ivy() } } From 5187ce94650dafc6936c8aefb2a211e862c03e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 7 Feb 2024 16:27:05 +0100 Subject: [PATCH 29/54] tools_intellij_platform_gradle_plugin_extension.md: edits --- ...tellij_platform_gradle_plugin_extension.md | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index 32bfc4540..a8849965c 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -13,7 +13,7 @@ It consists of sections dedicated to the general Gradle plugin configuration,

plugin.xml file with new values. +Configures the plugin definition and stores values in the `plugin.xml` file. +Data provided to the `intellijPlatform.pluginConfiguration {}` extension is passed to the [`patchPluginXml`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml) task, which augments the plugin.xml file with new values. **Example:** @@ -159,7 +159,7 @@ See also: ### name {#intellijPlatform-pluginConfiguration-name} -The plugin display name, visible to users (Title Case). +The plugin's display name, visible to users (Title Case). The inputted value will be used to populate the `` element. @@ -177,7 +177,7 @@ See also: The plugin version, presented in the Plugins settings dialog and on its JetBrains Marketplace page. -For plugins uploaded to the JetBrains Marketplace, semantic versioning must be adhered to. +For plugins uploaded to the JetBrains Marketplace, [semantic versioning](https://plugins.jetbrains.com/docs/marketplace/semver.html) must be adhered to. The specified value will be used as a `` element. @@ -196,7 +196,7 @@ See also: The plugin description, which is presented on the JetBrains Marketplace plugin page and in the Plugins settings dialog. Basic HTML elements such as text formatting, paragraphs, and lists are permitted. -The description content is automatically enclosed by ``. +The description content is automatically enclosed in ``. The supplied value will populate the `` element. @@ -216,7 +216,7 @@ A concise summary of new features, bug fixes, and alterations provided in the la These change notes will be displayed on the JetBrains Marketplace plugin page and in the Plugins settings dialog. Basic HTML elements such as text formatting, paragraphs, and lists are permitted. -The change notes content is automatically encapsulated in ``. +The change notes content is automatically enclosed in ``. The inputted value will populate the `` element. @@ -324,12 +324,10 @@ See also: - [Plugin Configuration File: `product-descriptor`](plugin_configuration_file.md#idea-plugin__product-descriptor) -## IDEA Version +## Idea Version {#intellijPlatform-pluginConfiguration-ideaVersion} -Configures the `idea-version` section of the plugin. - -A part of the [](#intellijPlatform-pluginConfiguration) which describes the `idea-version` element. +A part of the [](#intellijPlatform-pluginConfiguration) which describes the `` element. **Example:** @@ -347,7 +345,10 @@ intellijPlatform { } } ``` +See also: +- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) +- [](build_number_ranges.md) ### sinceBuild {#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild} @@ -367,13 +368,14 @@ Default value See also: - [Tasks: `patchPluginXml.sinceBuild`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-sinceBuild) -- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) ### untilBuild {#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild} -The latest IDE version that is compatible with the plugin. An undefined value signifies compatibility with all IDEs starting from the version mentioned in `since-build`, including potential future builds that may cause compatibility issues. +The latest IDE version that is compatible with the plugin. +An undefined value signifies compatibility with all IDEs starting from the version mentioned in `since-build`, +including potential future builds that may cause compatibility issues. The given value will be assigned to the `` element attribute. @@ -388,15 +390,12 @@ Default value See also: - [Tasks: `patchPluginXml.untilBuild`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-untilBuild) -- [Plugin Configuration File: `idea-version`](plugin_configuration_file.md#idea-plugin__idea-version) ## Vendor {#intellijPlatform-pluginConfiguration-vendor} -Configures the `idea-version` section of the plugin. - -A part of the [](#intellijPlatform-pluginConfiguration) which describes the `vendor` element. +A part of the [](#intellijPlatform-pluginConfiguration) which describes the `` element. **Example:** @@ -416,6 +415,8 @@ intellijPlatform { } ``` +See also: +- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) ### name {#intellijPlatform-pluginConfiguration-vendor-name} @@ -430,7 +431,6 @@ Type See also: - [Tasks: `patchPluginXml.vendorName`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-vendorName) -- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) ### email @@ -446,7 +446,6 @@ Type See also: - [Tasks: `patchPluginXml.vendorEmail`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-vendorEmail) -- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) ### url @@ -462,7 +461,6 @@ Type See also: - [Tasks: `patchPluginXml.vendorUrl`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-vendorUrl) -- [Plugin Configuration File: `vendor`](plugin_configuration_file.md#idea-plugin__vendor) ## Publishing @@ -539,7 +537,7 @@ See also: ### toolboxEnterprise {#intellijPlatform-publishing-toolboxEnterprise} -Specifies if the Toolbox Enterprise plugin repository service should be used. +Specify if the Toolbox Enterprise plugin repository service should be used. {style="narrow"} Type @@ -905,7 +903,7 @@ See also: ### subsystemsToCheck {#intellijPlatform-verifyPlugin-subsystemsToCheck} -Specifies which subsystems of IDE should be checked. +Which subsystems of the IDE should be checked. {style="narrow"} Type @@ -1008,12 +1006,12 @@ See also: - [Types: `ProductRelease.Channel`](tools_intellij_platform_gradle_plugin_types.md#ProductRelease-Channel) - [Types: `ProductReleasesValueSource.FilterParameters`](tools_intellij_platform_gradle_plugin_types.md#ProductReleasesValueSource-FilterParameters) -| Function | Description | -|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `ide(type, version)` `ide(definition)` | Adds a dependency to a binary IDE release to be used for testing with the IntelliJ Plugin Verifier. | -| `localIde(localPath)` | Adds the local IDE to be used for testing with the IntelliJ Plugin Verifier. | -| `recommended()` | Retrieves matching IDEs using the default configuration based on the currently used IntelliJ Platform and applies them for IntelliJ Platform Verifier using the `ide` helper method. | -| `select(configure)` | Retrieves matching IDEs using custom [`ProductReleasesValueSource.FilterParameters`](tools_intellij_platform_gradle_plugin_types.md#ProductReleasesValueSource-FilterParameters) filter parameters. | +| Function | Description | +|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|

`ide(type, version)`

`ide(definition)`

| Adds a dependency to a binary IDE release to be used for testing with the IntelliJ Plugin Verifier. | +| `localIde(localPath)` | Adds the local IDE to be used for testing with the IntelliJ Plugin Verifier. | +| `recommended()` | Retrieves matching IDEs using the default configuration based on the currently used IntelliJ Platform and applies them for IntelliJ Platform Verifier using the `ide` helper method. | +| `select(configure)` | Retrieves matching IDEs using custom [`ProductReleasesValueSource.FilterParameters`](tools_intellij_platform_gradle_plugin_types.md#ProductReleasesValueSource-FilterParameters) filter parameters. | From 5ec5ca65485807f82310caf1c1d3042bb8d9331f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Wed, 7 Feb 2024 16:55:23 +0100 Subject: [PATCH 30/54] tools_intellij_platform_gradle_plugin_tasks.md: edits --- ...s_intellij_platform_gradle_plugin_tasks.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 053d5c367..0b959de69 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -6,9 +6,9 @@ -The IntelliJ Platform Gradle Plugin introduces a set of tasks to handle activities of the plugin development for IntelliJ-based IDEs, such as building, verifying, testing, and publishing the output archive. +The IntelliJ Platform Gradle Plugin introduces a set of tasks to handle activities of the plugin development for IntelliJ-based IDEs, such as building, verifying, testing, and publishing the plugin archive. -Tasks are applied to the project with the [`org.jetbrains.intellij.platform.tasks`](tools_intellij_platform_gradle_plugin.md#plugin.tasks), which is a part of [`org.jetbrains.intellij.platform`](tools_intellij_platform_gradle_plugin.md#plugin.platform). +Tasks are applied to the project with the [`org.jetbrains.intellij.platform.tasks`](tools_intellij_platform_gradle_plugin.md#plugin.tasks) subplugin, which is a part of [`org.jetbrains.intellij.platform`](tools_intellij_platform_gradle_plugin.md#plugin.platform). Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. @@ -58,7 +58,7 @@ flowchart TD
-A task responsible for building plugin and preparing a ZIP archive for testing and deployment. +Builds the plugin and prepares the ZIP archive for testing and deployment. It takes the output of the [`prepareSandbox`](#prepareSandbox) task containing the built project with all its modules and dependencies, and the output of [`jarSearchableOptions`](#jarSearchableOptions) task. @@ -96,9 +96,9 @@ Default value Builds the index of UI components (searchable options) for the plugin. This task runs a headless IDE instance to collect all the available options provided by the plugin's [](settings.md). -If your plugin doesn't implement custom settings, it is recommended to disable it with [`intellijPlatform.buildSearchableOptions`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions). +If your plugin doesn't implement custom settings, it is recommended to disable this task via [`intellijPlatform.buildSearchableOptions`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions) build feature. -In the case of running the task for the plugin which has the [`intellijPlatform.pluginConfiguration.productDescriptor`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor) configures, a warning will be logged regarding potential issues with running headless IDE for paid plugins. +In the case of running the task for the plugin using [`intellijPlatform.pluginConfiguration.productDescriptor`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-productDescriptor), a warning will be logged regarding potential issues with running headless IDE for paid plugins. It is possible to mute this warning with the [`paidPluginSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#paidPluginSearchableOptionsWarning) build feature. @@ -151,10 +151,10 @@ Default value This task is executed before every other task introduced by IntelliJ Platform Gradle Plugin to prepare it to run. It is responsible for: -- checking if the project uses IntelliJ Platform Gradle Plugin in the latest available version, -- preparing the KotlinX Coroutines Java Agent file to enable coroutines debugging when developing the plugin. +- checking if the project uses IntelliJ Platform Gradle Plugin in the latest available version +- preparing the KotlinX Coroutines Java Agent file to enable coroutines debugging when developing the plugin -The self-update check can be disabled with [`selfUpdateCheck`](tools_intellij_platform_gradle_plugin_build_features.md#selfUpdateCheck) build feature. +The self-update check can be disabled via [`selfUpdateCheck`](tools_intellij_platform_gradle_plugin_build_features.md#selfUpdateCheck) build feature. To make the Coroutines Java Agent available for the task, inherit from [`CoroutinesJavaAgentAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CoroutinesJavaAgentAware). @@ -164,7 +164,7 @@ To make the Coroutines Java Agent available for the task, inherit from [`Corouti Determines if the operation is running in offline mode. -Depends on Gradle start parameters +Depends on Gradle start parameters. {style="narrow"} Type @@ -181,7 +181,7 @@ See also: ### selfUpdateCheck {#initializeIntelliJPlatformPlugin-selfUpdateCheck} -Represents the property for checking if self-update is enabled. +Represents the property for checking if self-update checks are enabled. {style="narrow"} Type @@ -195,7 +195,7 @@ Default value {#initializeIntelliJPlatformPlugin-selfUpdateLock} Represents a lock file used to limit the plugin version checks in time. -If a file is absent, and other conditions are met, the version check is performed. +If the file is absent, and other conditions are met, the version check is performed. {style="narrow"} Type @@ -255,7 +255,7 @@ See also: ### inputFile {#patchPluginXml-inputFile} -Represents an input `plugin.xml` file. +Represents an input plugin.xml file. By default, a plugin.xml file is picked from the main resource location. @@ -270,9 +270,9 @@ Default value ### outputFile {#patchPluginXml-outputFile} -Represents the output plugin.xml file property for a task. +Represents the output plugin.xml file property for the task. -By default, the file is written to a temporary task directory within the build directory. +By default, the file is written to a temporary task-specific directory within the build directory. {style="narrow"} Type @@ -559,7 +559,7 @@ Prepares a sandbox environment with the installed plugin and its dependencies. The sandbox directory is required to run a guest IDE and tests in isolation from other instances, like when multiple IntelliJ Platforms are used for testing with [`runIde`](#runIde), [`testIde`](#testIde), [`testIdeUi`](#testIdeUi), or [`testIdePerformance`](#testIdePerformance) tasks. -To fully utilize the sandbox capabilities in a task, make it extend the [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) interface. +To fully utilize the sandbox capabilities in a task, extend from [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) interface. See also: - [Extension: `intellijPlatform.sandboxContainer`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-sandboxContainer) @@ -645,9 +645,9 @@ Type The task for publishing plugin to the remote plugins repository, such as [JetBrains Marketplace](https://plugins.jetbrains.com). See also: -- [Uploading a Plugin to JetBrains Marketplace](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#uploading-a-plugin-to-jetbrains-marketplace) +- [Uploading a Plugin to JetBrains Marketplace](publishing_plugin.md#uploading-a-plugin-to-jetbrains-marketplace) +- [Publishing Plugin With Gradle](publishing_plugin.md#publishing-plugin-with-gradle) - [Plugin upload API](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html) -- [Publishing Plugin With Gradle](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#publishing-plugin-with-gradle) ### archiveFile @@ -655,7 +655,7 @@ See also: ZIP archive to be published to the remote repository. -By default, it uses an output `archiveFile` of the [`signPlugin`](#signPlugin) task if plugin signing is configured, otherwise [`buildPlugin`](#buildPlugin). +By default, it uses the output `archiveFile` of the [`signPlugin`](#signPlugin) task if plugin signing is configured, otherwise the one from [`buildPlugin`](#buildPlugin). {style="narrow"} Type @@ -751,7 +751,7 @@ Default value ## setupDependencies {#setupDependencies} -> Deprecated. +> Deprecated. See [Migration FAQ](tools_intellij_platform_gradle_plugin_migration.md#setupdependencies-task). > {style="warning"} @@ -765,7 +765,7 @@ To sign the plugin before publishing to [JetBrains Marketplace](https://plugins. As soon as [`privateKey`](#signPlugin-privateKey) (or [`privateKeyFile`](#signPlugin-privateKeyFile)) and [`certificateChain`](#signPlugin-certificateChain) (or [`certificateChainFile`](#signPlugin-certificateChainFile) properties are specified, the task will be executed automatically right before the [`publishPlugin`](#publishPlugin) task. -For more details, see [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html) article. +For more details, see [](plugin_signing.md). ### archiveFile @@ -986,8 +986,8 @@ See also: - [Types: `FailureLevel`](tools_intellij_platform_gradle_plugin_types.md#FailureLevel) - [Types: `Subsystems`](tools_intellij_platform_gradle_plugin_types.md#Subsystems) - [Types: `VerificationReportsFormats`](tools_intellij_platform_gradle_plugin_types.md#VerificationReportsFormats) +- [Verifying Plugin Compatibility](verifying_plugin_compatibility.md) - [IntelliJ Plugin Verifier](https://github.com/JetBrains/intellij-plugin-verifier) -- [Verifying Plugin Compatibility](https://plugins.jetbrains.com/docs/intellij/verifying-plugin-compatibility.html) ### ides From 82c159be2132880cbb38ef6b623c09183d676ab2 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Wed, 7 Feb 2024 22:36:37 +0100 Subject: [PATCH 31/54] IntelliJ Platform Gradle Plugin: `jarSearchableOptions` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 86 ++++++++++++++++++- 1 file changed, 82 insertions(+), 4 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 0b959de69..83432773f 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -13,8 +13,10 @@ Tasks are applied to the project with the [`org.jetbrains.intellij.platform.task Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. ```mermaid -flowchart TD +flowchart subgraph ALL ["` `"] + direction TB + buildPlugin buildSearchableOptions jarSearchableOptions @@ -23,21 +25,31 @@ flowchart TD jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions + buildSearchableOptions --> jarSearchableOptions end - classpathIndexCleanup initializeIntelliJPlatformPlugin --> ALL + subgraph Undocumented + classpathIndexCleanup + instrumentCode + instrumentedJar + end + click buildPlugin "#buildPlugin" click buildSearchableOptions "#buildSearchableOptions" click classpathIndexCleanup "#classpathIndexCleanup" click initializeIntelliJPlatformPlugin "#initializeIntelliJPlatformPlugin" + click instrumentCode "#instrumentCode" + click instrumentedJar "#instrumentedJar" click jarSearchableOptions "#jarSearchableOptions" click patchPluginXml "#patchPluginXml" click prepareSandbox "#prepareSandbox" style classpathIndexCleanup fill:#eee,stroke-dasharray: 5 5 - style jarSearchableOptions fill:#eee + style instrumentCode fill:#eee,stroke-dasharray: 5 5 + style instrumentedJar fill:#eee,stroke-dasharray: 5 5 + style patchPluginXml fill:#eee style prepareSandbox fill:#eee style prepareSandbox fill:#eee @@ -247,6 +259,71 @@ See also: ## jarSearchableOptions {#jarSearchableOptions} + + +**Sources**: [`JarSearchableOptionsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/JarSearchableOptionsTask.kt) + +**Extends**: [`Jar`][gradle-jar-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) + +**Depends on**: [`buildSearchableOptions`](#buildSearchableOptions) + + + +Creates a JAR file with searchable options to be distributed with the plugin. + + +### destinationDirectory +{#jarSearchableOptions-destinationDirectory} + +The directory where the JAR file will be created. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: `[buildDirectory]/libsSearchableOptions` + + +### inputDirectory +{#jarSearchableOptions-inputDirectory} + +The directory from which + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: `[buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar` + + +### noSearchableOptionsWarning +{#jarSearchableOptions-noSearchableOptionsWarning} + +Emit warning if no searchable options are found. +Can be disabled with [`noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) build feature. + +{style="narrow"} +Type +: `Property` + +Default value +: [`noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) + + +### pluginName +{#jarSearchableOptions-pluginName} + +The name of the plugin. + +{style="narrow"} +Type +: `Property` + +Default value +: [`intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) + ## patchPluginXml {#patchPluginXml} @@ -1146,5 +1223,6 @@ Default value [gradle-default-task]: https://docs.gradle.org/current/dsl/org.gradle.api.DefaultTask.html -[gradle-javaexec-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec +[gradle-jar-task]: https://docs.gradle.org/current/dsl/org.gradle.jvm.tasks.Jar.html +[gradle-javaexec-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html [gradle-zip-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html From d0be2890d5d1f017979fdcbc3d2fc29f9df50f8b Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 8 Feb 2024 13:31:48 +0100 Subject: [PATCH 32/54] IntelliJ Platform Gradle Plugin: Introduce `intellijPlatform.productInfo` extension property --- ...tellij_platform_gradle_plugin_extension.md | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index a8849965c..e0efdb560 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -19,8 +19,8 @@ After the IntelliJ Platform Gradle Plugin is [applied](tools_intellij_platform_g ```kotlin intellijPlatform { - instrumentCode = true buildSearchableOptions = true + instrumentCode = true sandboxContainer = "..." pluginConfiguration { @@ -39,6 +39,23 @@ intellijPlatform { ``` +### buildSearchableOptions +{#intellijPlatform-buildSearchableOptions} + +Builds an index of UI components (searchable options) for the plugin. +Controls the execution of the [`buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) task. + +{style="narrow"} +Type +: `Property` + +Default value +: `true` + +See also: +- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) + + ### instrumentCode {#intellijPlatform-instrumentCode} @@ -61,21 +78,17 @@ Default value : `true` -### buildSearchableOptions -{#intellijPlatform-buildSearchableOptions} +### productInfo +{#intellijPlatform-productInfo} -Builds an index of UI components (searchable options) for the plugin. -Controls the execution of the [`buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) task. +Provides read access for the [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) object associated with the IntelliJ Platform dependency configured for the current project. {style="narrow"} Type -: `Property` +: [`Property`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) Default value -: `true` - -See also: -- [Build Features: `noSearchableOptionsWarning`](tools_intellij_platform_gradle_plugin_build_features.md#noSearchableOptionsWarning) +: [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) for the current IntelliJ Platform ### sandboxContainer From 9c1cd19778975feafab70980b632110e15391a3e Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 8 Feb 2024 14:25:09 +0100 Subject: [PATCH 33/54] IntelliJ Platform Gradle Plugin: allow to unset `until-build` --- .../tools_intellij_platform_gradle_plugin_extension.md | 3 +++ .../tools_intellij_platform_gradle_plugin_tasks.md | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index e0efdb560..97426ebff 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -394,6 +394,9 @@ The given value will be assigned to the `` element The default value is set to the `MAJOR.*` version based on the currently selected IntelliJ Platform, such as `233.*`. +The `until-build` attribute can be unset by setting `provider { null }` as a value. +Note that passing only `null` will make Gradle use a default value instead. + {style="narrow"} Type : `Property` diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 83432773f..97c13beb3 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -543,7 +543,7 @@ See also: The lowest IDE version compatible with the plugin. -The provided value will be set as a value of the `` element attribute. +The provided value will be set as a value of the `` element attribute. {style="narrow"} Type @@ -562,7 +562,10 @@ See also: The highest IDE version compatible with the plugin. Undefined value declares compatibility with all the IDEs since the version specified by the `since-build` (also with the future builds that may cause incompatibility errors). -The provided value will be set as a value of the `` element attribute. +The provided value will be set as a value of the `` element attribute. + +The `until-build` attribute can be unset by setting `provider { null }` as a value. +Note that passing only `null` will make Gradle use a default value instead. {style="narrow"} Type From 892bb45aa2958f8f4dc43c2d034ff52b28ba46f9 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 8 Feb 2024 17:22:44 +0100 Subject: [PATCH 34/54] IntelliJ Platform Gradle Plugin: add `plugin(notation)`, `plugins(notations)`, bundledPlugins(ids)` functions to dependencies extension --- ...j_platform_gradle_plugin_dependencies_extension.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md index 08f116b09..5cfedc8b0 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -85,10 +85,13 @@ See also: ## Plugins -| Function | Description | -|--------------------------------|----------------------------------------------------------| -| `plugin(id, version, channel)` | Adds a dependency on a plugin for IntelliJ Platform. | -| `bundledPlugin(id)` | Adds a dependency on a bundled IntelliJ Platform plugin. | +| Function | Description | +|--------------------------------|------------------------------------------------------------------------------------------------------------------------------| +| `plugin(id, version, channel)` | Adds a dependency on a plugin for IntelliJ Platform. | +| `plugin(notation)` | Adds a dependency on a plugin for IntelliJ Platform using a string notation (`pluginId:version`, `pluginId:version@channel`) | +| `plugins(notations)` | Adds dependencies on plugins for IntelliJ Platform using a string notation (`pluginId:version`, `pluginId:version@channel`) | +| `bundledPlugin(id)` | Adds a dependency on a bundled IntelliJ Platform plugin. | +| `bundledPlugins(ids)` | Adds dependencies on bundled IntelliJ Platform plugins. | See also: From 2577983a03fb4d2f092a0248a92bea61730f5678 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Fri, 9 Feb 2024 12:41:05 +0100 Subject: [PATCH 35/54] IntelliJ Platform Gradle Plugin: tasks diagram styling for dark theme --- .../tools_intellij_platform_gradle_plugin_tasks.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 97c13beb3..e7e80c72d 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -46,15 +46,14 @@ flowchart click patchPluginXml "#patchPluginXml" click prepareSandbox "#prepareSandbox" - style classpathIndexCleanup fill:#eee,stroke-dasharray: 5 5 - style instrumentCode fill:#eee,stroke-dasharray: 5 5 - style instrumentedJar fill:#eee,stroke-dasharray: 5 5 + style classpathIndexCleanup stroke-dasharray: 5 5 + style instrumentCode stroke-dasharray: 5 5 + style instrumentedJar stroke-dasharray: 5 5 - style patchPluginXml fill:#eee - style prepareSandbox fill:#eee - style prepareSandbox fill:#eee + style patchPluginXml stroke-dasharray: 5 5 + style prepareSandbox stroke-dasharray: 5 5 - style ALL fill:#fff,stroke:#eee + style ALL fill:transparent,stroke:#eee ``` ## buildPlugin From f408368aef465e53bd7688990980375e67bdc052 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Sun, 11 Feb 2024 21:57:31 +0100 Subject: [PATCH 36/54] IntelliJPlatformRepositoriesExtension: rename `recommended` to `defaultRepositories`; remove `jetbrainsRuntime` and `binaryReleasesAndroidStudio` from `defaultRepositories` --- .../tools_intellij_platform_gradle_plugin.md | 16 ++++++++-------- ...orm_gradle_plugin_dependencies_extension.md | 4 ++-- ...orm_gradle_plugin_repositories_extension.md | 18 +++++++++--------- ...ls_intellij_platform_gradle_plugin_tasks.md | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 83311451a..75d4a0a42 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -139,19 +139,19 @@ To access the IntelliJ Platform Gradle Plugin within the settings.gradle.k import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform plugins { - id("org.jetbrains.intellij.platform.settings") version "%intellij-platform-gradle-plugin-version%" + id("org.jetbrains.intellij.platform.settings") version "%intellij-platform-gradle-plugin-version%" } dependencyResolutionManagement { - repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS + repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS - repositories { - mavenCentral() + repositories { + mavenCentral() - intellijPlatform { - recommended() - } + intellijPlatform { + defaultRepositories() } + } } ``` @@ -174,7 +174,7 @@ repositories { mavenCentral() intellijPlatform { - recommended() + defaultRepositories() } } diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md index 5cfedc8b0..76af32bda 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_dependencies_extension.md @@ -18,7 +18,7 @@ It also includes methods for adding IntelliJ Platform plugins, IntelliJ Platform **Example:** -- setup Maven Central and `recommended()` [repositories](tools_intellij_platform_gradle_plugin_repositories_extension.md) +- setup Maven Central and [`defaultRepositories()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#default-repositories) - target IntelliJ IDEA Community %ijPlatform% - add dependency on bundled Java plugin - add IntelliJ Plugin Verifier and Marketplace ZIP Signer CLI tools @@ -29,7 +29,7 @@ repositories { mavenCentral() intellijPlatform { - recommended() + defaultRepositories() } } diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md index 95dd2eb76..36cb38a27 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md @@ -21,40 +21,40 @@ It provides methods to add: -> In most cases, simply using [`recommended()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#recommended) repository will be sufficient. +> In most cases, simply using [`defaultRepositories()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#default-repositories) repository will be sufficient. > {style="tip"} **Example:** -Setup Maven Central and [`recommended()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#recommended) repositories: +Setup Maven Central and [`defaultRepositories()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#default-repositories) repositories: ```kotlin repositories { mavenCentral() intellijPlatform { - recommended() + defaultRepositories() } } ``` -## Recommended +## Default Repositories The default repository definition suitable for most plugins. -| Function | Description | -|-----------------|--------------------------------------------| -| `recommended()` | Applies a set of recommended repositories. | +| Function | Description | +|-------------------------|--------------------------------------------| +| `defaultRepositories()` | Applies a set of recommended repositories. | It includes: +- `ivy()` - `releases()`, `snapshots()` - `marketplace()` -- `jetbrainsRuntime()` -- `binaryReleases()`, `binaryReleasesAndroidStudio()` +- `binaryReleases()` ## IDE Releases diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index e7e80c72d..ebaa31615 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -636,7 +636,7 @@ See also: Prepares a sandbox environment with the installed plugin and its dependencies. -The sandbox directory is required to run a guest IDE and tests in isolation from other instances, like when multiple IntelliJ Platforms are used for testing with [`runIde`](#runIde), [`testIde`](#testIde), [`testIdeUi`](#testIdeUi), or [`testIdePerformance`](#testIdePerformance) tasks. +The sandbox directory is required by tasks that run IDE and tests in isolation from other instances, like when multiple IntelliJ Platforms are used for testing with [`runIde`](#runIde), [`testIde`](#testIde), [`testIdeUi`](#testIdeUi), or [`testIdePerformance`](#testIdePerformance) tasks. To fully utilize the sandbox capabilities in a task, extend from [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) interface. From 59f14064ada8b263286608673f779aa9fa66507d Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Sun, 11 Feb 2024 22:47:42 +0100 Subject: [PATCH 37/54] IntelliJPlatformRepositoriesExtension: rename `ivy` to `localPlatformArtifacts`; docs --- .../tools_intellij_platform_gradle_plugin.md | 4 ++-- ...rm_gradle_plugin_repositories_extension.md | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md index 75d4a0a42..461e19c36 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin.md @@ -233,7 +233,7 @@ It is possible to refer to the locally available IntelliJ-based IDE using the `l ```kotlin repositories { intellijPlatform { - ivy() + localPlatformArtifacts() } } @@ -244,7 +244,7 @@ dependencies { } ``` -Note that the `ivy` entry needs to be added to the `repositories {}` block as all local dependencies (local IDE, bundled plugins, etc.) rely on the Ivy repositories. +Note that the `localPlatformArtifacts()` entry needs to be added to the `repositories {}` block as all local dependencies (local IDE, bundled plugins, etc.) rely on the Ivy repositories. ### Setting Up Plugin Dependencies diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md index 36cb38a27..b057166d2 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_repositories_extension.md @@ -45,16 +45,16 @@ repositories { The default repository definition suitable for most plugins. -| Function | Description | -|-------------------------|--------------------------------------------| -| `defaultRepositories()` | Applies a set of recommended repositories. | +| Function | Description | +|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------| +| `defaultRepositories()` | Applies a set of recommended repositories required for running the most common tasks provided by the IntelliJ Platform Gradle Plugin. | It includes: +- `localPlatformArtifacts()` — required to use plugins bundled with IntelliJ Platform or refer to the local IDE +- `releases()` and `snapshots()` — IntelliJ Platform releases channels +- `marketplace()` — JetBrains Marketplace plugins repository +- `binaryReleases()` — JetBrains IDEs releases required for running the IntelliJ Plugin Verifier -- `ivy()` -- `releases()`, `snapshots()` -- `marketplace()` -- `binaryReleases()` ## IDE Releases @@ -80,11 +80,11 @@ See also: ## Additional Repositories -| Function | Description | -|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `ivy()` | Adds a local [Ivy](https://ant.apache.org/ivy/) repository for resolving local Ivy XML files used for describing artifacts like [local IntelliJ Platform instance](tools_intellij_platform_gradle_plugin.md#dependenciesLocalPlatform), bundled plugins, and other dependencies that utilize `createIvyDependency`. | -| `jetbrainsRuntime()` | Adds a repository for accessing [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance) releases. | -| `marketplace()` | Adds a repository for accessing plugins hosted on [JetBrains Marketplace](https://plugins.jetbrains.com). | +| Function | Description | +|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `localPlatformArtifacts()` | Certain dependencies, such as the [local IntelliJ Platform instance](tools_intellij_platform_gradle_plugin.md#dependenciesLocalPlatform) and bundled IDE plugins, need extra pre-processing before they can be correctly used by the IntelliJ Platform Gradle Plugin and loaded by Gradle. This pre-processing involves generating XML files that detail these specific artifacts. Once created, these XMLs are stored in a unique custom [Ivy](https://ant.apache.org/ivy/) repository directory. | +| `jetbrainsRuntime()` | Adds a repository for accessing [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance) releases. | +| `marketplace()` | Adds a repository for accessing plugins hosted on [JetBrains Marketplace](https://plugins.jetbrains.com). | See also: From eb1ff118aece9bc57b0a5812ba834a81f5e2ad98 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 12:26:53 +0100 Subject: [PATCH 38/54] Bring back `channels` property when publishing a plugin --- ...ls_intellij_platform_gradle_plugin_extension.md | 14 +++++++------- .../tools_intellij_platform_gradle_plugin_tasks.md | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md index 97426ebff..270f9ea00 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_extension.md @@ -494,7 +494,7 @@ intellijPlatform { publishing { host = "" token = "7hR4nD0mT0k3n_8f2eG" - channel = "default" + channels = listOf("default") toolboxEnterprise = false hidden = false } @@ -534,20 +534,20 @@ See also: - [Tasks: `publishPlugin.token`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-token) -### channel -{#intellijPlatform-publishing-channel} +### channels +{#intellijPlatform-publishing-channels} -A channel name to upload plugin to. +A list of channel names to upload plugin to. {style="narrow"} Type -: `Property` +: `ListProperty` Default value: -: `"default"` +: `listOf("default")` See also: -- [Tasks: `publishPlugin.channel`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-channel) +- [Tasks: `publishPlugin.channels`](tools_intellij_platform_gradle_plugin_tasks.md#publishPlugin-channels) ### toolboxEnterprise diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index ebaa31615..433b6ed10 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -776,17 +776,17 @@ Default value : [`intellijPlatform.publishing.token`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-token) -### channel -{#publishPlugin-channel} +### channels +{#publishPlugin-channels} -A channel name to upload plugin to. +A list of channel names to upload plugin to. {style="narrow"} Type -: `Property` +: `ListProperty` Default value -: [`intellijPlatform.publishing.channel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channel) +: [`intellijPlatform.publishing.channels`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-channels) ### hidden From b150fb6fd060437727f2d3516ccec58063b1c23d Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 14:02:48 +0100 Subject: [PATCH 39/54] IntelliJ Platform Gradle Plugin: `patchPluginXml` task --- .../tools_intellij_platform_gradle_plugin_tasks.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 433b6ed10..3764faa44 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -50,7 +50,6 @@ flowchart style instrumentCode stroke-dasharray: 5 5 style instrumentedJar stroke-dasharray: 5 5 - style patchPluginXml stroke-dasharray: 5 5 style prepareSandbox stroke-dasharray: 5 5 style ALL fill:transparent,stroke:#eee @@ -327,6 +326,14 @@ Default value ## patchPluginXml {#patchPluginXml} + + +**Sources**: [`PatchPluginXmlTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PatchPluginXmlTask.kt) + +**Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) + + + ### inputFile {#patchPluginXml-inputFile} @@ -357,6 +364,7 @@ Type Default value : [buildDirectory]/tmp/patchPluginXml/plugin.xml + ### pluginId {#patchPluginXml-pluginId} From b5ddedcbab6723afb684abd0aba8588e43f86b2b Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 14:13:19 +0100 Subject: [PATCH 40/54] IntelliJ Platform Gradle Plugin: `prepareSandbox` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 3764faa44..3a54fc726 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -14,6 +14,10 @@ Each of the tasks has relations described between each other, inherit from [](to ```mermaid flowchart + subgraph Gradle Tasks + jar + end + subgraph ALL ["` `"] direction TB @@ -26,6 +30,7 @@ flowchart jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions buildSearchableOptions --> jarSearchableOptions + jar & instrumentedJar --> prepareSandbox end initializeIntelliJPlatformPlugin --> ALL @@ -50,8 +55,6 @@ flowchart style instrumentCode stroke-dasharray: 5 5 style instrumentedJar stroke-dasharray: 5 5 - style prepareSandbox stroke-dasharray: 5 5 - style ALL fill:transparent,stroke:#eee ``` @@ -642,6 +645,16 @@ See also: ## prepareSandbox {#prepareSandbox} + + +**Sources**: [`PrepareSandboxTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrepareSandboxTask.kt) + +**Extends**: [`Sync`][gradle-jar-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) + +**Depends on**: `jar`, [`instrumentedJar`](#instrumentedJar) + + + Prepares a sandbox environment with the installed plugin and its dependencies. The sandbox directory is required by tasks that run IDE and tests in isolation from other instances, like when multiple IntelliJ Platforms are used for testing with [`runIde`](#runIde), [`testIde`](#testIde), [`testIdeUi`](#testIdeUi), or [`testIdePerformance`](#testIdePerformance) tasks. @@ -711,7 +724,7 @@ See also: ### runtimeClasspath {#prepareSandbox-runtimeClasspath} -Dependencies removed with the `runtimeClasspath` configuration. +Dependencies defined with the `runtimeClasspath` configuration. {style="narrow"} Type @@ -1235,4 +1248,5 @@ Default value [gradle-default-task]: https://docs.gradle.org/current/dsl/org.gradle.api.DefaultTask.html [gradle-jar-task]: https://docs.gradle.org/current/dsl/org.gradle.jvm.tasks.Jar.html [gradle-javaexec-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html +[gradle-sync-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Sync.html [gradle-zip-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html From dbaba2884c1302cf57a82c46427a6b28b92f273b Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 16:27:38 +0100 Subject: [PATCH 41/54] IntelliJ Platform Gradle Plugin: `printBundledPlugins` task --- .../tools_intellij_platform_gradle_plugin_tasks.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 3a54fc726..47b953eb6 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -26,6 +26,7 @@ flowchart jarSearchableOptions patchPluginXml prepareSandbox + printBundledPlugins jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions @@ -50,6 +51,7 @@ flowchart click jarSearchableOptions "#jarSearchableOptions" click patchPluginXml "#patchPluginXml" click prepareSandbox "#prepareSandbox" + click printBundledPlugins "#printBundledPlugins" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -734,6 +736,16 @@ Type ## printBundledPlugins {#printBundledPlugins} + + +**Sources**: [`PrintBundledPluginsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrintBundledPluginsTask.kt) + +**Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) + + + +Prints the list of bundled plugins available within the currently targeted IntelliJ Platform. + ## printProductsReleases {#printProductsReleases} From 98a1ea16b38bdf04979a2282701aee383a90269c Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 17:00:58 +0100 Subject: [PATCH 42/54] IntelliJ Platform Gradle Plugin: `printProductsReleases` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 47b953eb6..96bf3a012 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -27,6 +27,7 @@ flowchart patchPluginXml prepareSandbox printBundledPlugins + printProductsReleases jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions @@ -52,6 +53,7 @@ flowchart click patchPluginXml "#patchPluginXml" click prepareSandbox "#prepareSandbox" click printBundledPlugins "#printBundledPlugins" + click printProductsReleases "#printProductsReleases" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -750,6 +752,30 @@ Prints the list of bundled plugins available within the currently targeted Intel ## printProductsReleases {#printProductsReleases} + + +**Sources**: [`PrintProductsReleasesTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrintProductsReleasesTask.kt) + +**Extends**: [`DefaultTask`][gradle-default-task] + + + +Prints the list of binary product releases that, by default, match the currently selected IntelliJ Platform along with [`intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild) and [`intellijPlatform.pluginConfiguration.ideaVersion.untilBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild) properties. + + +### productsReleases +{#printProductsReleases-productsReleases} + +Property holds the list of product releases to print. + +{style="narrow"} +Type +: `ListProperty` + +Default value +: The output of `ProductReleasesValueSource` using default configuration + + ## publishPlugin {#publishPlugin} From 7a6382a99c8cc33376d0ad65ceabcaf8db8bd5c1 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 17:07:32 +0100 Subject: [PATCH 43/54] IntelliJ Platform Gradle Plugin: `publishPlugin` task --- ...tools_intellij_platform_gradle_plugin_tasks.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 96bf3a012..9f974f28d 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -28,11 +28,14 @@ flowchart prepareSandbox printBundledPlugins printProductsReleases + publishPlugin + signPlugin jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions buildSearchableOptions --> jarSearchableOptions jar & instrumentedJar --> prepareSandbox + buildPlugin & signPlugin --> publishPlugin end initializeIntelliJPlatformPlugin --> ALL @@ -54,6 +57,7 @@ flowchart click prepareSandbox "#prepareSandbox" click printBundledPlugins "#printBundledPlugins" click printProductsReleases "#printProductsReleases" + click publishPlugin "#publishPlugin" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -776,10 +780,19 @@ Default value : The output of `ProductReleasesValueSource` using default configuration - ## publishPlugin {#publishPlugin} + + +**Sources**: [`PublishPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PublishPluginTask.kt) + +**Extends**: [`DefaultTask`][gradle-default-task] + +**Depends on**: [`buildPlugin`](#buildPlugin), [`signPlugin`](#signPlugin) + + + The task for publishing plugin to the remote plugins repository, such as [JetBrains Marketplace](https://plugins.jetbrains.com). See also: From a3fc8fff1cb74676e1ff16b94c670158fa921327 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 17:10:23 +0100 Subject: [PATCH 44/54] IntelliJ Platform Gradle Plugin: `buildPlugin` task --- .../tools_intellij_platform_gradle_plugin_tasks.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 9f974f28d..693789578 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -36,6 +36,7 @@ flowchart buildSearchableOptions --> jarSearchableOptions jar & instrumentedJar --> prepareSandbox buildPlugin & signPlugin --> publishPlugin + buildPlugin --> signPlugin end initializeIntelliJPlatformPlugin --> ALL @@ -910,6 +911,16 @@ Default value ## signPlugin {#signPlugin} + + +**Sources**: [`SignPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/SignPluginTask.kt) + +**Extends**: [`JavaExec`][gradle-javaexec-task], [`SigningAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SigningAware) + +**Depends on**: [`buildPlugin`](#buildPlugin) + + + Signs the ZIP archive with the provided key using the [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) library. To sign the plugin before publishing to [JetBrains Marketplace](https://plugins.jetbrains.com) with the [`signPlugin`](#signPlugin) task, it is required to provide a certificate chain and a private key with its password using [`intellijPlatform.signing`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-signing) extension. From c34ddf3adba3a3272c9fe1f26431f8e4e5ced0ed Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 17:36:33 +0100 Subject: [PATCH 45/54] IntelliJ Platform Gradle Plugin: `runIde` task --- ...llij_platform_gradle_plugin_task_awares.md | 8 ++-- ...s_intellij_platform_gradle_plugin_tasks.md | 37 ++++++++++++++++--- ...s_intellij_platform_gradle_plugin_types.md | 6 +-- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md index cd99075b3..54661ea58 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -126,12 +126,12 @@ Type : [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) -### assertIntelliJPlatformSupportedVersion() -{#IntelliJPlatformVersionAware-assertIntelliJPlatformSupportedVersion} +### validateIntelliJPlatformVersion() +{#IntelliJPlatformVersionAware-validateIntelliJPlatformVersion} -Asserts that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version. +Validates that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version. -Invokes [`ProductInfo.assertSupportedVersion()`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo-assertSupportedVersion). +Invokes [`ProductInfo.validateSupportedVersion()`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo-validateSupportedVersion). {style="narrow"} Throws diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 693789578..939a28d95 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -29,6 +29,7 @@ flowchart printBundledPlugins printProductsReleases publishPlugin + runIde signPlugin jarSearchableOptions & prepareSandbox --> buildPlugin @@ -59,6 +60,8 @@ flowchart click printBundledPlugins "#printBundledPlugins" click printProductsReleases "#printProductsReleases" click publishPlugin "#publishPlugin" + click runIde "#runIde" + click signPlugin "#signPlugin" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -891,14 +894,38 @@ Default value : [`intellijPlatform.publishing.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-toolboxEnterprise) -> Not implemented. -> -{style="warning"} - - ## runIde {#runIde} + + +**Sources**: [`RunIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/RunIdeTask.kt) + +**Extends**: [`JavaExec`][gradle-javaexec-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware), [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware) + + + +Runs the IDE instance using the currently selected IntelliJ Platform with the built plugin loaded. +It directly extends the [`JavaExec`][gradle-javaexec-task] Gradle task, which allows for an extensive configuration (system properties, memory management, etc.). + +This task class also inherits from [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware), which makes it possible to create `runIde` tasks using custom IntelliJ Platform versions: + +```Kotlin +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType +import org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask + +tasks { + val runPhpStorm by registering(RunIdeTask::class) { + type = IntelliJPlatformType.PhpStorm + version = "2023.2.2" + } + + val runLocalIde by registering(RunIdeTask::class) { + localPath = file("/Users/hsz/Applications/Android Studio.app") + } +} +``` + ## setupDependencies {#setupDependencies} diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md index 83db49965..58a10b94c 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md @@ -84,10 +84,10 @@ The information is retrieved from the product-info.json file in the | fileExtensions | The list of file extensions associated with the product. | | modules | The list of modules of the product. | -### assertSupportedVersion() -{#ProductInfo-assertSupportedVersion} +### validateSupportedVersion() +{#ProductInfo-validateSupportedVersion} -Asserts that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version. +Validates that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version. If the provided version is lower, an `IllegalArgumentException` is thrown with an appropriate message. From 01705bc0cfbefbabcfd64909427629c16cb8fe01 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 12 Feb 2024 18:17:22 +0100 Subject: [PATCH 46/54] IntelliJ Platform Gradle Plugin: `testIde` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 939a28d95..463ef2401 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -31,6 +31,7 @@ flowchart publishPlugin runIde signPlugin + testIde jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions @@ -62,6 +63,7 @@ flowchart click publishPlugin "#publishPlugin" click runIde "#runIde" click signPlugin "#signPlugin" + click testIde "#testIde" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -908,9 +910,9 @@ Default value Runs the IDE instance using the currently selected IntelliJ Platform with the built plugin loaded. It directly extends the [`JavaExec`][gradle-javaexec-task] Gradle task, which allows for an extensive configuration (system properties, memory management, etc.). -This task class also inherits from [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware), which makes it possible to create `runIde` tasks using custom IntelliJ Platform versions: +This task class also inherits from [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware), which makes it possible to create `runIde`-like tasks using custom IntelliJ Platform versions: -```Kotlin +```kotlin import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType import org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask @@ -1136,6 +1138,36 @@ Default value {#testIde} + + +**Sources**: [`TestIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/TestIdeTask.kt) + +**Extends**: [`Test`][gradle-test-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware), [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware) + + + +Runs plugin tests against the currently selected IntelliJ Platform with the built plugin loaded. +It directly extends the [`Test`][gradle-test-task] Gradle task, which allows for an extensive configuration (system properties, memory management, etc.). + +This task class also inherits from [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware), which makes it possible to create `testIde`-like tasks using custom IntelliJ Platform versions: + +```kotlin +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType +import org.jetbrains.intellij.platform.gradle.tasks.TestIdeTask + +tasks { + val testPhpStorm by registering(TestIdeTask::class) { + type = IntelliJPlatformType.PhpStorm + version = "2023.2.2" + } + + val testLocalIde by registering(TestIdeTask::class) { + localPath = file("/Users/hsz/Applications/Android Studio.app") + } +} +``` + + ## testIdePerformance {#testIdePerformance} @@ -1338,4 +1370,5 @@ Default value [gradle-jar-task]: https://docs.gradle.org/current/dsl/org.gradle.jvm.tasks.Jar.html [gradle-javaexec-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.JavaExec.html [gradle-sync-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Sync.html +[gradle-test-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html [gradle-zip-task]: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Zip.html From 8e47dace83ea0813484b97c5ee559287b734e193 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 12:07:22 +0100 Subject: [PATCH 47/54] IntelliJ Platform Gradle Plugin: `verifyPluginProjectConfiguration` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 200 +++++++++++++++++- 1 file changed, 197 insertions(+), 3 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 463ef2401..82a1d7567 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -13,8 +13,11 @@ Tasks are applied to the project with the [`org.jetbrains.intellij.platform.task Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. ```mermaid -flowchart - subgraph Gradle Tasks +flowchart TB + subgraph GRADLE ["Gradle Tasks"] + direction LR + + test jar end @@ -32,6 +35,7 @@ flowchart runIde signPlugin testIde + verifyPluginProjectConfiguration jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions @@ -39,9 +43,11 @@ flowchart jar & instrumentedJar --> prepareSandbox buildPlugin & signPlugin --> publishPlugin buildPlugin --> signPlugin + patchPluginXml --> verifyPluginProjectConfiguration + verifyPluginProjectConfiguration ----> test end - initializeIntelliJPlatformPlugin --> ALL + initializeIntelliJPlatformPlugin ---> ALL subgraph Undocumented classpathIndexCleanup @@ -49,6 +55,11 @@ flowchart instrumentedJar end + + test ~~~ jar + buildSearchableOptions ~~~ instrumentedJar + ALL ~~~ GRADLE + click buildPlugin "#buildPlugin" click buildSearchableOptions "#buildSearchableOptions" click classpathIndexCleanup "#classpathIndexCleanup" @@ -64,6 +75,7 @@ flowchart click runIde "#runIde" click signPlugin "#signPlugin" click testIde "#testIde" + click verifyPluginProjectConfiguration "#verifyPluginProjectConfiguration" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -1187,6 +1199,188 @@ tasks { ## verifyPluginProjectConfiguration {#verifyPluginProjectConfiguration} + + +**Sources**: [`VerifyPluginProjectConfigurationTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginProjectConfigurationTask.kt) + +**Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) + +**Depends on**: [`patchPluginXml`](#patchPluginXml) + + + +Validates the plugin project configuration: +- The [`patchPluginXml.sinceBuild`](#patchPluginXml-sinceBuild) property can't be lower than the target IntelliJ Platform major version. +- The Java/Kotlin `sourceCompatibility` and `targetCompatibility` properties should align Java versions required by [`patchPluginXml.sinceBuild`](#patchPluginXml-sinceBuild) and the currently used IntelliJ Platform. +- The Kotlin API version should align the version required by [`patchPluginXml.sinceBuild`](#patchPluginXml-sinceBuild) and the currently used IntelliJ Platform. +- The used IntelliJ Platform version should be higher than `2022.3` (`223.0`). +- The dependency on the [](using_kotlin.md#kotlin-standard-library) should be excluded. +- The Kotlin plugin in version `1.8.20` is not used with IntelliJ Platform Gradle Plugin due to the 'java.lang.OutOfMemoryError: Java heap space' exception. +- The Kotlin Coroutines library should not be added explicitly to the project as it is already provided with the IntelliJ Platform. + +For more details regarding the Java version used in the specific IntelliJ SDK, see [](build_number_ranges.md). + +See also: +- [](build_number_ranges.md) +- [](using_kotlin.md#kotlin-standard-library) +- [](using_kotlin.md#incremental-compilation) + + +### pluginXmlFile +{#verifyPluginProjectConfiguration-pluginXmlFile} + +The location of the built plugin file which will be used for verification. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`patchPluginXml.outputFile`](#patchPluginXml-outputFile) + + +### reportDirectory +{#verifyPluginProjectConfiguration-reportDirectory} + +Report directory where the verification result will be stored. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [buildDirectory]/reports/verifyPluginConfiguration + + +### sourceCompatibility +{#verifyPluginProjectConfiguration-sourceCompatibility} + +The `JavaCompile.sourceCompatibility` property value defined in the build script. + +{style="narrow"} +Type +: `Property` + +Default value +: `JavaCompile.sourceCompatibility` + + +### targetCompatibility +{#verifyPluginProjectConfiguration-targetCompatibility} + +The `JavaCompile.targetCompatibility` property value defined in the build script. + +{style="narrow"} +Type +: `Property` + +Default value +: `JavaCompile.targetCompatibility` + + +### kotlinPluginAvailable +{#verifyPluginProjectConfiguration-kotlinPluginAvailable} + +Indicates that the Kotlin Gradle Plugin is loaded and available. + +{style="narrow"} +Type +: `Property` + +Default value +: Kotlin Gradle Plugin presence + + +### kotlinApiVersion +{#verifyPluginProjectConfiguration-kotlinApiVersion} + +The `apiVersion` property value of `compileKotlin.kotlinOptions` defined in the build script. + +{style="narrow"} +Type +: `Property` + +Default value +: `compileKotlin.kotlinOptions.apiVersion` + + +### kotlinLanguageVersion +{#verifyPluginProjectConfiguration-kotlinLanguageVersion} + +The `languageVersion` property value of `compileKotlin.kotlinOptions` defined in the build script. + +{style="narrow"} +Type +: `Property` + +Default value +: `compileKotlin.kotlinOptions.languageVersion` + + +### kotlinVersion +{#verifyPluginProjectConfiguration-kotlinVersion} + +The version of the Kotlin used in the project. + +{style="narrow"} +Type +: `Property` + +Default value +: `kotlin.coreLibrariesVersion` + + +### kotlinJvmTarget +{#verifyPluginProjectConfiguration-kotlinJvmTarget} + +The `jvmTarget` property value of `compileKotlin.kotlinOptions` defined in the build script. + +{style="narrow"} +Type +: `Property` + +Default value +: `compileKotlin.kotlinOptions.jvmTarget` + + +### kotlinStdlibDefaultDependency +{#verifyPluginProjectConfiguration-kotlinStdlibDefaultDependency} + +`kotlin.stdlib.default.dependency` property value defined in the `gradle.properties` file. + +{style="narrow"} +Type +: `Property` + +Default value +: `kotlin.stdlib.default.dependency` Gradle property + + +### kotlinIncrementalUseClasspathSnapshot +{#verifyPluginProjectConfiguration-kotlinIncrementalUseClasspathSnapshot} + +`kotlin.incremental.useClasspathSnapshot` property value defined in the `gradle.properties` file. + +{style="narrow"} +Type +: `Property` + +Default value +: `kotlin.incremental.useClasspathSnapshot` Gradle property + + +### kotlinxCoroutinesLibraryPresent +{#verifyPluginProjectConfiguration-kotlinxCoroutinesLibraryPresent} + +This variable represents whether the Kotlin Coroutines library is added explicitly to the project dependencies. + +{style="narrow"} +Type +: `Property` + +Default value +: The `org.jetbrains.kotlinx:kotlinx-coroutines` dependency presence + ## verifyPluginSignature {#verifyPluginSignature} From 98da9ebd31fd9247dc3a37df67b2e647d5360b0c Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 12:11:45 +0100 Subject: [PATCH 48/54] IntelliJ Platform Gradle Plugin: `verifyPluginProjectConfiguration` task --- .../tools_intellij_platform_gradle_plugin_tasks.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 82a1d7567..c82ba68e3 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -19,6 +19,7 @@ flowchart TB test jar + compileKotlin end subgraph ALL ["` `"] @@ -44,7 +45,7 @@ flowchart TB buildPlugin & signPlugin --> publishPlugin buildPlugin --> signPlugin patchPluginXml --> verifyPluginProjectConfiguration - verifyPluginProjectConfiguration ----> test + verifyPluginProjectConfiguration ----> test & compileKotlin end initializeIntelliJPlatformPlugin ---> ALL From 64f85e4aa4e98a12230f02b5f490f1c7487192f6 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 12:14:07 +0100 Subject: [PATCH 49/54] IntelliJ Platform Gradle Plugin: Tasks TL;DR reordering --- ...s_intellij_platform_gradle_plugin_tasks.md | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index c82ba68e3..879072aae 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -90,11 +90,11 @@ flowchart TB -**Sources**: [`BuildPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildPluginTask.kt) +**Depends on**: [`jarSearchableOptions`](#jarSearchableOptions), [`prepareSandbox`](#prepareSandbox) **Extends**: [`Zip`][gradle-zip-task] -**Depends on**: [`jarSearchableOptions`](#jarSearchableOptions), [`prepareSandbox`](#prepareSandbox) +**Sources**: [`BuildPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildPluginTask.kt) @@ -125,11 +125,11 @@ Default value -**Sources**: [`BuildSearchableOptionsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildSearchableOptionsTask.kt) +**Depends on**: [`patchPluginXml`](#patchPluginXml) **Extends**: [`JavaExec`][gradle-javaexec-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware) -**Depends on**: [`patchPluginXml`](#patchPluginXml) +**Sources**: [`BuildSearchableOptionsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/BuildSearchableOptionsTask.kt) @@ -182,10 +182,10 @@ Default value -**Sources**: [`InitializeIntelliJPlatformPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/InitializeIntelliJPlatformPluginTask.kt) - **Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) +**Sources**: [`InitializeIntelliJPlatformPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/InitializeIntelliJPlatformPluginTask.kt) + This task is executed before every other task introduced by IntelliJ Platform Gradle Plugin to prepare it to run. @@ -289,11 +289,11 @@ See also: -**Sources**: [`JarSearchableOptionsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/JarSearchableOptionsTask.kt) +**Depends on**: [`buildSearchableOptions`](#buildSearchableOptions) **Extends**: [`Jar`][gradle-jar-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) -**Depends on**: [`buildSearchableOptions`](#buildSearchableOptions) +**Sources**: [`JarSearchableOptionsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/JarSearchableOptionsTask.kt) @@ -358,10 +358,10 @@ Default value -**Sources**: [`PatchPluginXmlTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PatchPluginXmlTask.kt) - **Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) +**Sources**: [`PatchPluginXmlTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PatchPluginXmlTask.kt) + @@ -674,11 +674,11 @@ See also: -**Sources**: [`PrepareSandboxTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrepareSandboxTask.kt) +**Depends on**: `jar`, [`instrumentedJar`](#instrumentedJar) **Extends**: [`Sync`][gradle-jar-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) -**Depends on**: `jar`, [`instrumentedJar`](#instrumentedJar) +**Sources**: [`PrepareSandboxTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrepareSandboxTask.kt) @@ -763,10 +763,10 @@ Type -**Sources**: [`PrintBundledPluginsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrintBundledPluginsTask.kt) - **Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) +**Sources**: [`PrintBundledPluginsTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrintBundledPluginsTask.kt) + Prints the list of bundled plugins available within the currently targeted IntelliJ Platform. @@ -777,10 +777,10 @@ Prints the list of bundled plugins available within the currently targeted Intel -**Sources**: [`PrintProductsReleasesTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrintProductsReleasesTask.kt) - **Extends**: [`DefaultTask`][gradle-default-task] +**Sources**: [`PrintProductsReleasesTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PrintProductsReleasesTask.kt) + Prints the list of binary product releases that, by default, match the currently selected IntelliJ Platform along with [`intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-sinceBuild) and [`intellijPlatform.pluginConfiguration.ideaVersion.untilBuild`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-ideaVersion-untilBuild) properties. @@ -804,11 +804,11 @@ Default value -**Sources**: [`PublishPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PublishPluginTask.kt) +**Depends on**: [`buildPlugin`](#buildPlugin), [`signPlugin`](#signPlugin) **Extends**: [`DefaultTask`][gradle-default-task] -**Depends on**: [`buildPlugin`](#buildPlugin), [`signPlugin`](#signPlugin) +**Sources**: [`PublishPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/PublishPluginTask.kt) @@ -914,10 +914,10 @@ Default value -**Sources**: [`RunIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/RunIdeTask.kt) - **Extends**: [`JavaExec`][gradle-javaexec-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware), [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware) +**Sources**: [`RunIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/RunIdeTask.kt) + Runs the IDE instance using the currently selected IntelliJ Platform with the built plugin loaded. @@ -955,11 +955,11 @@ tasks { -**Sources**: [`SignPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/SignPluginTask.kt) +**Depends on**: [`buildPlugin`](#buildPlugin) **Extends**: [`JavaExec`][gradle-javaexec-task], [`SigningAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SigningAware) -**Depends on**: [`buildPlugin`](#buildPlugin) +**Sources**: [`SignPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/SignPluginTask.kt) @@ -1153,10 +1153,10 @@ Default value -**Sources**: [`TestIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/TestIdeTask.kt) - **Extends**: [`Test`][gradle-test-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware), [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware) +**Sources**: [`TestIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/TestIdeTask.kt) + Runs plugin tests against the currently selected IntelliJ Platform with the built plugin loaded. @@ -1202,11 +1202,11 @@ tasks { -**Sources**: [`VerifyPluginProjectConfigurationTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginProjectConfigurationTask.kt) +**Depends on**: [`patchPluginXml`](#patchPluginXml) **Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) -**Depends on**: [`patchPluginXml`](#patchPluginXml) +**Sources**: [`VerifyPluginProjectConfigurationTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginProjectConfigurationTask.kt) From cabd8cf5dbc7dedd3152c008560e7f362c93b65a Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 12:32:48 +0100 Subject: [PATCH 50/54] IntelliJ Platform Gradle Plugin: `verifyPluginSignature` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 879072aae..7f50159ec 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -37,6 +37,7 @@ flowchart TB signPlugin testIde verifyPluginProjectConfiguration + verifyPluginSignature jarSearchableOptions & prepareSandbox --> buildPlugin patchPluginXml --> buildSearchableOptions @@ -46,6 +47,7 @@ flowchart TB buildPlugin --> signPlugin patchPluginXml --> verifyPluginProjectConfiguration verifyPluginProjectConfiguration ----> test & compileKotlin + verifyPluginSignature --> signPlugin end initializeIntelliJPlatformPlugin ---> ALL @@ -77,6 +79,7 @@ flowchart TB click signPlugin "#signPlugin" click testIde "#testIde" click verifyPluginProjectConfiguration "#verifyPluginProjectConfiguration" + click verifyPluginSignature "#verifyPluginSignature" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -1386,6 +1389,65 @@ Default value ## verifyPluginSignature {#verifyPluginSignature} + + +**Depends on**: [`signPlugin`](#signPlugin) + +**Extends**: [`JavaExec`][gradle-javaexec-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SigningAware) + +**Sources**: [`PrepareSandboxTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginSignatureTask.kt) + + + +Validates the signature of the plugin archive file using the [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) library. + +See also: +- [](plugin_signing.md) +- [Marketplace ZIP Signer](https://github.com/JetBrains/marketplace-zip-signer) + + +### inputArchiveFile +{#verifyPluginSignature-inputArchiveFile} + +Input, unsigned ZIP archive file. +Refers to `in` CLI option. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`signPlugin.signedArchiveFile`](#signPlugin-signedArchiveFile) + + +### certificateChain +{#verifyPluginSignature-certificateChain} + +A string containing X509 certificates. +The first certificate from the chain will be used as a certificate authority (CA). +Refers to `cert` CLI option. + +Takes precedence over the [`certificateChainFile`](#verifyPluginSignature-certificateChainFile) property. + +{style="narrow"} +Type +: `Property` + + +### certificateChainFile +{#verifyPluginSignature-certificateChainFile} + +Path to the file containing X509 certificates. +The first certificate from the chain will be used as a certificate authority (CA). +Refers to `cert-file` CLI option. + +{style="narrow"} +Type +: `RegularFileProperty` + +Default value +: [`signPlugin.certificateChainFile`](#signPlugin-certificateChainFile) or [`signPlugin.certificateChain`](#signPlugin-certificateChain) written to a temporary file + ## verifyPluginStructure {#verifyPluginStructure} From a87d32a839c96c07aeae3c4f62d3e5d24f251068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 13 Feb 2024 12:35:38 +0100 Subject: [PATCH 51/54] tools_intellij_platform_gradle_plugin_tasks.md: rework task graph --- ...s_intellij_platform_gradle_plugin_tasks.md | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 7f50159ec..7ba50cec1 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -13,44 +13,37 @@ Tasks are applied to the project with the [`org.jetbrains.intellij.platform.task Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. ```mermaid -flowchart TB - subgraph GRADLE ["Gradle Tasks"] - direction LR +flowchart - test - jar - compileKotlin - end - - subgraph ALL ["` `"] - direction TB + subgraph TASKS ["`**IntelliJ Platform Gradle Plugin Tasks**`"] + direction BT buildPlugin buildSearchableOptions jarSearchableOptions patchPluginXml prepareSandbox - printBundledPlugins - printProductsReleases - publishPlugin - runIde - signPlugin - testIde verifyPluginProjectConfiguration + + subgraph PUBLISH ["Publish"] + publishPlugin + signPlugin + end + + subgraph RUN ["Run/Test"] + runIde + testIde + end verifyPluginSignature - jarSearchableOptions & prepareSandbox --> buildPlugin - patchPluginXml --> buildSearchableOptions - buildSearchableOptions --> jarSearchableOptions - jar & instrumentedJar --> prepareSandbox - buildPlugin & signPlugin --> publishPlugin - buildPlugin --> signPlugin - patchPluginXml --> verifyPluginProjectConfiguration - verifyPluginProjectConfiguration ----> test & compileKotlin + subgraph PLATFORM ["Target Platform"] + printBundledPlugins + printProductsReleases + end verifyPluginSignature --> signPlugin end - initializeIntelliJPlatformPlugin ---> ALL + initializeIntelliJPlatformPlugin[/initializeIntelliJPlatformPlugin/] --> |Runs before| TASKS subgraph Undocumented classpathIndexCleanup @@ -58,10 +51,22 @@ flowchart TB instrumentedJar end + subgraph GRADLE ["Gradle Tasks"] + test + jar + compileKotlin + end + + buildPlugin --> jarSearchableOptions & prepareSandbox + buildSearchableOptions --> patchPluginXml + jarSearchableOptions --> buildSearchableOptions + prepareSandbox --> jar & instrumentedJar + publishPlugin --> buildPlugin & signPlugin + signPlugin --> buildPlugin test ~~~ jar buildSearchableOptions ~~~ instrumentedJar - ALL ~~~ GRADLE + TASKS ~~~ GRADLE click buildPlugin "#buildPlugin" click buildSearchableOptions "#buildSearchableOptions" @@ -85,7 +90,7 @@ flowchart TB style instrumentCode stroke-dasharray: 5 5 style instrumentedJar stroke-dasharray: 5 5 - style ALL fill:transparent,stroke:#eee + style TASKS fill:transparent ``` ## buildPlugin From 82fe37703b6c22aa371e376436bb7f502bad6925 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 12:55:01 +0100 Subject: [PATCH 52/54] IntelliJ Platform Gradle Plugin: `verifyPluginStructure` task --- ...s_intellij_platform_gradle_plugin_tasks.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 7ba50cec1..d6c518e16 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -24,6 +24,7 @@ flowchart patchPluginXml prepareSandbox verifyPluginProjectConfiguration + verifyPluginStructure subgraph PUBLISH ["Publish"] publishPlugin @@ -85,6 +86,7 @@ flowchart click testIde "#testIde" click verifyPluginProjectConfiguration "#verifyPluginProjectConfiguration" click verifyPluginSignature "#verifyPluginSignature" + click verifyPluginStructure "#verifyPluginStructure" style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 @@ -1457,6 +1459,71 @@ Default value ## verifyPluginStructure {#verifyPluginStructure} + + +**Extends**: [`DefaultTask`][gradle-default-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) + +**Sources**: [`/Users/hsz/Projects/JetBrains/gradle-intellij-plugin/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginStructureTask.kt`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks//Users/hsz/Projects/JetBrains/gradle-intellij-plugin/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginStructureTask.kt.kt) + + + +Validates completeness and contents of `plugin.xml` descriptors as well as plugin archive structure. + +See also: +- [](plugin_configuration_file.md) + + +### ignoreFailures +{#verifyPluginStructure-ignoreFailures} + +Specifies whether the build should fail when the verifications performed by this task fail. + +{style="narrow"} +Type +: `Property` + +Default value +: `false` + + +### ignoreUnacceptableWarnings +{#verifyPluginStructure-ignoreUnacceptableWarnings} + +Specifies whether the build should fail when the verifications performed by this task emit unacceptable warnings. + +{style="narrow"} +Type +: `Property` + +Default value +: `false` + + +### ignoreWarnings +{#verifyPluginStructure-ignoreWarnings} + +Specifies whether the build should fail when the verifications performed by this task emit warnings. + +{style="narrow"} +Type +: `Property` + +Default value +: `true` + + +### pluginDirectory +{#verifyPluginStructure-pluginDirectory} + +The location of the built plugin file which will be used for verification. + +{style="narrow"} +Type +: `DirectoryProperty` + +Default value +: [`prepareSandbox.defaultDestinationDirectory`](#prepareSandbox-defaultDestinationDirectory)/[`intellijPlatform.pluginConfiguration.name`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-pluginConfiguration-name) + ## verifyPlugin {#verifyPlugin} From 042035c929d92c27c453456642311cdfd9ea453b Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 13:20:18 +0100 Subject: [PATCH 53/54] IntelliJ Platform Gradle Plugin: `verifyPlugin` task --- .../tools_intellij_platform_gradle_plugin_tasks.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index d6c518e16..0135b619e 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -25,6 +25,7 @@ flowchart prepareSandbox verifyPluginProjectConfiguration verifyPluginStructure + verifyPlugin subgraph PUBLISH ["Publish"] publishPlugin @@ -1528,10 +1529,19 @@ Default value ## verifyPlugin {#verifyPlugin} + + +**Depends on**: [`buildPlugin`](#buildPlugin) + +**Extends**: [`JavaExec`][gradle-javaexec-task], [`RuntimeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RuntimeAware), [`PluginVerifierAware`](tools_intellij_platform_gradle_plugin_task_awares.md#PluginVerifierAware) + +**Sources**: [`VerifyPluginTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt) + + + Runs the IntelliJ Plugin Verifier CLI tool to check the binary compatibility with specified IDE builds. See also: -- [Awares: `PluginVerifierAware`](tools_intellij_platform_gradle_plugin_task_awares.md#PluginVerifierAware) - [Extension: `intellijPlatform.verifyPlugin`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin) - [Types: `FailureLevel`](tools_intellij_platform_gradle_plugin_types.md#FailureLevel) - [Types: `Subsystems`](tools_intellij_platform_gradle_plugin_types.md#Subsystems) From e94b43e35f15ef597d02948da90cdb359068de78 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 13 Feb 2024 17:50:56 +0100 Subject: [PATCH 54/54] IntelliJ Platform Gradle Plugin: tasks graph --- ...s_intellij_platform_gradle_plugin_tasks.md | 106 ++++++++++-------- 1 file changed, 62 insertions(+), 44 deletions(-) diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 0135b619e..8de306c38 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -13,44 +13,50 @@ Tasks are applied to the project with the [`org.jetbrains.intellij.platform.task Each of the tasks has relations described between each other, inherit from [](tools_intellij_platform_gradle_plugin_task_awares.md) interfaces, respect configuration and build cache, and can be configured independently, but for the most cases, the [](tools_intellij_platform_gradle_plugin_extension.md) covers all necessary cases. ```mermaid -flowchart +flowchart LR subgraph TASKS ["`**IntelliJ Platform Gradle Plugin Tasks**`"] - direction BT + direction TB - buildPlugin - buildSearchableOptions - jarSearchableOptions - patchPluginXml - prepareSandbox - verifyPluginProjectConfiguration - verifyPluginStructure - verifyPlugin + initializeIntelliJPlatformPlugin - subgraph PUBLISH ["Publish"] - publishPlugin - signPlugin + subgraph ALL ["` `"] + buildPlugin + buildSearchableOptions + classpathIndexCleanup>classpathIndexCleanup] + instrumentCode>instrumentCode] + instrumentedJar>instrumentedJar] + jarSearchableOptions + patchPluginXml + prepareSandbox + setupDependencies>setupDependencies] + + subgraph PUBLISH ["Publish"] + publishPlugin + signPlugin + end + + subgraph RUN ["Run/Test"] + runIde + testIde + testIdePerformance>testIdePerformance] + testIdeUi>testIdeUi] + end + + subgraph VERIFY ["Verify"] + direction TB + + verifyPluginSignature + verifyPluginProjectConfiguration + verifyPluginStructure + verifyPlugin + end + + subgraph PLATFORM ["Target Platform"] + printBundledPlugins + printProductsReleases + end end - - subgraph RUN ["Run/Test"] - runIde - testIde - end - verifyPluginSignature - - subgraph PLATFORM ["Target Platform"] - printBundledPlugins - printProductsReleases - end - verifyPluginSignature --> signPlugin - end - - initializeIntelliJPlatformPlugin[/initializeIntelliJPlatformPlugin/] --> |Runs before| TASKS - - subgraph Undocumented - classpathIndexCleanup - instrumentCode - instrumentedJar end subgraph GRADLE ["Gradle Tasks"] @@ -59,16 +65,22 @@ flowchart compileKotlin end + + initializeIntelliJPlatformPlugin --> | runs before | ALL buildPlugin --> jarSearchableOptions & prepareSandbox - buildSearchableOptions --> patchPluginXml - jarSearchableOptions --> buildSearchableOptions + jarSearchableOptions --> buildSearchableOptions & prepareSandbox + buildSearchableOptions --> patchPluginXml & prepareSandbox prepareSandbox --> jar & instrumentedJar publishPlugin --> buildPlugin & signPlugin + runIde --> prepareSandbox signPlugin --> buildPlugin + testIde --> prepareSandbox + test --> testIde + verifyPluginProjectConfiguration --> patchPluginXml + verifyPluginSignature --> signPlugin & prepareSandbox + verifyPluginStructure --> prepareSandbox + verifyPlugin --> buildPlugin - test ~~~ jar - buildSearchableOptions ~~~ instrumentedJar - TASKS ~~~ GRADLE click buildPlugin "#buildPlugin" click buildSearchableOptions "#buildSearchableOptions" @@ -83,17 +95,23 @@ flowchart click printProductsReleases "#printProductsReleases" click publishPlugin "#publishPlugin" click runIde "#runIde" + click setupDependencies "#setupDependencies" click signPlugin "#signPlugin" click testIde "#testIde" + click testIdePerformance "#testIdePerformance" + click testIdeUi "#testIdeUi" click verifyPluginProjectConfiguration "#verifyPluginProjectConfiguration" click verifyPluginSignature "#verifyPluginSignature" click verifyPluginStructure "#verifyPluginStructure" + click verifyPlugin "#verifyPlugin" + + style TASKS fill:transparent + style ALL fill:transparent style classpathIndexCleanup stroke-dasharray: 5 5 style instrumentCode stroke-dasharray: 5 5 style instrumentedJar stroke-dasharray: 5 5 - - style TASKS fill:transparent + style setupDependencies stroke-dasharray: 5 5 ``` ## buildPlugin @@ -263,7 +281,7 @@ Type : `Property` Default value -: `[buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar` +: [buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar ### pluginVersion @@ -321,7 +339,7 @@ Type : `DirectoryProperty` Default value -: `[buildDirectory]/libsSearchableOptions` +: [buildDirectory]/libsSearchableOptions ### inputDirectory @@ -334,7 +352,7 @@ Type : `DirectoryProperty` Default value -: `[buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar` +: [buildDirectory]/tmp/initializeIntelliJPlatformPlugin/coroutines-javaagent.jar ### noSearchableOptionsWarning @@ -1464,7 +1482,7 @@ Default value **Extends**: [`DefaultTask`][gradle-default-task], [`SandboxAware`](tools_intellij_platform_gradle_plugin_task_awares.md#SandboxAware) -**Sources**: [`/Users/hsz/Projects/JetBrains/gradle-intellij-plugin/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginStructureTask.kt`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks//Users/hsz/Projects/JetBrains/gradle-intellij-plugin/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginStructureTask.kt.kt) +**Sources**: [`VerifyPluginStructureTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginStructureTask.kt)