From adeca9b1c5d8f8c6cc2f21221c86e70bcd0c6234 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 29 Oct 2020 18:03:58 +0100 Subject: [PATCH] Introduce Plugin Verifier integration within the Gradle IntelliJ Plugin (#328) Introduce Plugin Verifier integration within the Gradle IntelliJ Plugin --- basics/getting_started.md | 4 ++-- basics/plugin_structure/dynamic_plugins.md | 2 +- reference_guide/api_changes_list.md | 8 ++++++-- tutorials/build_system/gradle_guide.md | 8 ++++++++ 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/basics/getting_started.md b/basics/getting_started.md index 81c2a0bb2..6b0412dff 100644 --- a/basics/getting_started.md +++ b/basics/getting_started.md @@ -25,8 +25,8 @@ Specific to development of IntelliJ Platform plugins with the Gradle plugin for * Changing the target IntelliJ Platform-based IDE, e.g., from IntelliJ IDEA to PyCharm, * Running a plugin against alternate versions of the JetBrains runtime. * Gradle is fully integrated with Continuous Integration systems and [JetBrains Plugin Repository](https://plugins.jetbrains.com), so it is easy to customize and extend the build and publishing processes. - * Built-in verification task for `plugin.xml` and plugin distribution structure, the same checks as on [JetBrains Plugin Repository](https://plugins.jetbrains.com). - + * Built-in verification task for `plugin.xml` and plugin distribution structure. + * Built-in integration with [IntelliJ Plugin Verifier](https://github.com/JetBrains/intellij-plugin-verifier) tool used for running the compatibility checks as performed on [JetBrains Plugin Repository](https://plugins.jetbrains.com). ## Using GitHub Template * [Developing plugins using GitHub Template](/tutorials/github_template.md) diff --git a/basics/plugin_structure/dynamic_plugins.md b/basics/plugin_structure/dynamic_plugins.md index f8e0039e7..13def1477 100644 --- a/basics/plugin_structure/dynamic_plugins.md +++ b/basics/plugin_structure/dynamic_plugins.md @@ -14,7 +14,7 @@ For a plugin to support this, all restrictions listed below must be met. To verify a plugin locally, run **Analyze \| Run Inspection by Name... \| Plugin.xml dynamic plugin verification** inspection on all plugin descriptor files. For plugins hosted on the [JetBrains Plugins Repository](https://plugins.jetbrains.com) the built-in [Plugin Verifier](https://blog.jetbrains.com/platform/2018/07/plugins-repository-now-integrates-with-the-plugin-verification-tool/) will run these checks automatically. -See [Plugin Verifier](/reference_guide/api_changes_list.md#plugin-verifier) for more information on how to run it locally. +See [Plugin Verifier](/reference_guide/api_changes_list.md#plugin-verifier) for more information on how to run it locally or on CI. ### No Use of Components diff --git a/reference_guide/api_changes_list.md b/reference_guide/api_changes_list.md index e8745768d..ac0f87688 100644 --- a/reference_guide/api_changes_list.md +++ b/reference_guide/api_changes_list.md @@ -73,9 +73,13 @@ IntelliJ API may be occasionally changed between releases, leading to existing p Compatibility with newer IDEs can easily be verified for plugins hosted on the [JetBrains Plugins Repository](https://plugins.jetbrains.com) using the built-in [Plugin Verifier](https://blog.jetbrains.com/platform/2018/07/plugins-repository-now-integrates-with-the-plugin-verification-tool/). For local verification or non-public plugins, [intellij-plugin-verifier](https://github.com/JetBrains/intellij-plugin-verifier) can be used standalone as well. -Integration in [Gradle build](/tutorials/build_system.md) is currently possible via some additional scripts, please see [this issue](https://github.com/JetBrains/gradle-intellij-plugin/issues/385) for details. -If your plugin is hosted on GitHub, it is also readily available via these GitHub Actions: +Integration in [Gradle build](/tutorials/build_system.md) is possible using the `runPluginVerifier` task, please see [Gradle IntelliJ Plugin - Plugin Verifier DSL](https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl) for details. + +You can easily integrate it within your CI by running that task as another quality check step. +Check the IntelliJ Platform Plugin Template [GitHub workflow configuration file](https://github.com/JetBrains/intellij-platform-plugin-template/blob/main/.github/workflows/build.yml) as sample. + +If your plugin is hosted on GitHub and you are not using Gradle, consider using the following third-party GitHub Actions: - [IntelliJ Platform Plugin Verifier](https://github.com/marketplace/actions/intellij-platform-plugin-verifier) - [IntelliJ Plugin Verifier](https://github.com/marketplace/actions/intellij-plugin-verifier) diff --git a/tutorials/build_system/gradle_guide.md b/tutorials/build_system/gradle_guide.md index 3d1076dc8..8d51fb25b 100644 --- a/tutorials/build_system/gradle_guide.md +++ b/tutorials/build_system/gradle_guide.md @@ -121,6 +121,14 @@ The best practice is to keep `project.version` current. By default, if you modify `project.version` in `build.gradle`, the Gradle plugin will automatically update the `` value in the `plugin.xml` file. This practice keeps all version declarations synchronized. +### Verifying plugin +The Gradle plugin provides two tasks that allow for running integrity and compatibility tests: +- `verifyPlugin` - validates completeness and contents of `plugin.xml` descriptors as well as plugin’s archive structure, +- `runPluginVerifier` - runs the [IntelliJ Plugin Verifier](https://github.com/JetBrains/intellij-plugin-verifier) tool to check the binary compatibility with specified IntelliJ IDE builds. + +Plugin Verifier integration task allows for configuring the exact IDE versions that your plugin will be checked against. +Please check the [Plugin Verifier DSL](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/build.gradle.kts#plugin-verifier-dsl) for more details. + ### Publishing with the Gradle Plugin Please review the [Publishing Plugins with Gradle](deployment.md) page before using the [Publishing DSL](https://github.com/JetBrains/gradle-intellij-plugin#publishing-dsl) attributes. That documentation explains different ways to use Gradle for plugin uploads without exposing account credentials.