From 770b0cc6603d3cc3934195daeff50b1502c8c53c Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Feb 2024 10:44:05 +0100 Subject: [PATCH] IntelliJ Platform Gradle Plugin: Introduce `PluginAware` task aware, `PluginBean` type, more details provided in Task Awares --- ...llij_platform_gradle_plugin_task_awares.md | 82 ++++++++++++++++--- ...s_intellij_platform_gradle_plugin_tasks.md | 15 +--- ...s_intellij_platform_gradle_plugin_types.md | 9 ++ 3 files changed, 80 insertions(+), 26 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 54661ea58..97dc220b7 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,12 +12,14 @@ The Task Awares is a set of interfaces that can be applied to custom Gradle task ## CoroutinesJavaAgentAware {#CoroutinesJavaAgentAware} -[`CoroutinesJavaAgentAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CoroutinesJavaAgentAware.kt) +**Depends on**: [`initializeIntelliJPlatformPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#initializeIntelliJPlatformPlugin) + +**Inherited by**: [`RunnableIdeAware`](#RunnableIdeAware) + +**Sources**: [`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. -Inherited also by [`RunnableIdeAware`](#RunnableIdeAware). - ### coroutinesJavaAgentFile {#CoroutinesJavaAgentAware-coroutinesJavaAgentFile} @@ -34,7 +36,9 @@ Default value ## CustomIntelliJPlatformVersionAware {#CustomIntelliJPlatformVersionAware} -[`CustomIntelliJPlatformVersionAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CustomIntelliJPlatformVersionAware.kt) +**Inherited by**: [`runIde`](tools_intellij_platform_gradle_plugin_tasks.md#runIde), [`testIde`](tools_intellij_platform_gradle_plugin_tasks.md#testIde), [`testIdePerformance`](tools_intellij_platform_gradle_plugin_tasks.md#testIdePerformance), [`testIdeUi`](tools_intellij_platform_gradle_plugin_tasks.md#testIdeUi) + +**Sources**: [`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 +88,9 @@ Type ## IntelliJPlatformVersionAware {#IntelliJPlatformVersionAware} -[`IntelliJPlatformVersionAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/IntelliJPlatformVersionAware.kt) +**Inherited by**: [`CustomIntelliJPlatformVersionAware`](#CustomIntelliJPlatformVersionAware), [`RuntimeAware`](#RuntimeAware), [`SandboxAware`](#SandboxAware), [`initializeIntelliJPlatformPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#initializeIntelliJPlatformPlugin), [`patchPluginXml`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml), [`printBundledPlugins`](tools_intellij_platform_gradle_plugin_tasks.md#printBundledPlugins), [`verifyPluginProjectConfiguration`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPluginProjectConfiguration) + +**Sources**: [`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. @@ -138,10 +144,50 @@ Throws : `IllegalArgumentException` +## PluginAware +{#PluginAware} + +**Depends on**: [`patchPluginXml`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml) + +**Inherited by**: [`RunnableIdeAware`](#RunnableIdeAware), [`verifyPluginProjectConfiguration`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPluginProjectConfiguration) + +**Sources**: [`PluginAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/PluginAware.kt) + + +This interface provides information about the currently built plugin. + +It resolves and parses the final plugin.xml descriptor file, making its details easily accessible. + + +### pluginXml +{#PluginAware-pluginXml} + +Holds the path to the patched plugin.xml file. + +{style="narrow"} +Type +: `RegularPropertyFile` + +Default value +: [`patchPluginXml.outputFile`](tools_intellij_platform_gradle_plugin_tasks.md#patchPluginXml-outputFile) + + +### plugin +{#PluginAware-plugin} + +Provides a parsed plugin.xml file as a [`PluginBean`](tools_intellij_platform_gradle_plugin_types.md#PluginBean) object. + +{style="narrow"} +Type +: [`PluginBean`](tools_intellij_platform_gradle_plugin_types.md#PluginBean) + + ## PluginVerifierAware {#PluginVerifierAware} -[`PluginVerifierAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/PluginVerifierAware.kt) +**Inherited by**: [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) + +**Sources**: [`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,10 +207,15 @@ Type ## RunnableIdeAware {#RunnableIdeAware} -[`RunnableIdeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt) +**Depends on**: [`initializeIntelliJPlatformPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#initializeIntelliJPlatformPlugin) -The interface which utilizes a set of various interfaces required for running a guest IDE. Inherits from: +**Inherited by**: [`buildSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions), [`runIde`](tools_intellij_platform_gradle_plugin_tasks.md#runIde), [`testIde`](tools_intellij_platform_gradle_plugin_tasks.md#testIde), [`testIdePerformance`](tools_intellij_platform_gradle_plugin_tasks.md#testIdePerformance), [`testIdeUi`](tools_intellij_platform_gradle_plugin_tasks.md#testIdeUi) + +**Sources**: [`RunnableIdeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt) + +The interface which uses a set of various interfaces required for running a guest IDE. Inherits from: - [`CoroutinesJavaAgentAware`](#CoroutinesJavaAgentAware) +- [`PluginAware`](#PluginAware) - [`RuntimeAware`](#RuntimeAware) - [`SandboxAware`](#SandboxAware) - `JavaForkOptions` @@ -173,7 +224,9 @@ The interface which utilizes a set of various interfaces required for running a ## RuntimeAware {#RuntimeAware} -[`RuntimeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RuntimeAware.kt) +**Inherited by**: [`RunnableIdeAware`](#RunnableIdeAware), [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) + +**Sources**: [`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`. @@ -207,11 +260,14 @@ Type : `Property` - ## SandboxAware {#SandboxAware} -[`SandboxAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SandboxAware.kt) +**Depends on**: [`prepareSandbox`](tools_intellij_platform_gradle_plugin_tasks.md#prepareSandbox) + +**Inherited by**: [`RunnableIdeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt), [`jarSearchableOptions`](tools_intellij_platform_gradle_plugin_tasks.md#jarSearchableOptions), [`prepareSandbox`](tools_intellij_platform_gradle_plugin_tasks.md#prepareSandbox), [`verifyPluginStructure`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPluginStructure) + +**Sources**: [`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 +341,9 @@ Type ## SigningAware {#SigningAware} -[`SigningAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SigningAware.kt) +**Inherited by**: [`signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin), [`verifyPluginSignature`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPluginSignature) + +**Sources**: [`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 4bbac9cfe..03cf83906 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 @@ -1224,7 +1224,7 @@ tasks { **Depends on**: [`patchPluginXml`](#patchPluginXml) -**Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware) +**Extends**: [`DefaultTask`][gradle-default-task], [`IntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#IntelliJPlatformVersionAware), [`PluginAware`](tools_intellij_platform_gradle_plugin_task_awares.md#PluginAware) **Sources**: [`VerifyPluginProjectConfigurationTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginProjectConfigurationTask.kt) @@ -1247,19 +1247,6 @@ See also: - [](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} 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 58a10b94c..2ac2c4d38 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 @@ -61,6 +61,15 @@ Each entry is composed of a product code name and coordinates used for dependenc | `Writerside` | `WRS` | `com.jetbrains.intellij.idea:writerside` | +## PluginBean +{#PluginBean} + +The `PluginBean` class describes the content of the plugin.xml file. + +See also: +- [`PluginBean` sources](https://github.com/JetBrains/intellij-plugin-verifier/blob/master/intellij-plugin-structure/structure-intellij/src/main/java/com/jetbrains/plugin/structure/intellij/beans/PluginBean.java) + + ## ProductInfo {#ProductInfo}