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] 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)