IntelliJ Platform Plugin SDK Help

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 dependencies on non-bundled plugins)

  • JetBrains Runtime repository

  • Android Studio and IntelliJ Platform binary release repositories (for IntelliJ Plugin Verifier)

  • Ivy local repository (for access to local dependencies)

Example:

Setup Maven Central and defaultRepositories() repositories:

repositories { mavenCentral() intellijPlatform { defaultRepositories() } }

Default Repositories

The default repository definition is suitable for most plugins.

Function

Description

defaultRepositories()

Applies a set of recommended repositories required for building plugins and running the most common tasks.

It includes:

  • jetbrainsIdeInstallers() and androidStudioInstallers() – IntelliJ Platform and Android Studio installer releases channels required for development and running the IntelliJ Plugin Verifier

  • releases() and snapshots() – IntelliJ Platform releases channels

  • localPlatformArtifacts() – required to use plugins bundled with IntelliJ Platform or refer to a local IDE

  • marketplace() – JetBrains Marketplace plugins repository

  • intellijDependencies() – required for resolving extra IntelliJ Platform dependencies used for running specific tasks

IntelliJ Platform Installers

IntelliJ Platform installers are the final IDE distributions delivered to end-users for installing and running products on their machines. Those installers can also be used for development and running the IntelliJ Plugin Verifier tool integrated with the verifyPlugin task.

Function

Description

jetbrainsIdeInstallers()

Adds a repository for accessing JetBrains IDEs installers.

androidStudioInstallers()

Adds a repository for accessing Android Studio installers.

See also:

IntelliJ Maven Repositories

IntelliJ Platform artifacts can be also delivered as multi-OS archives, however they do not contain JetBrains Runtime (JBR) bundled and require adding it explicitly to the project dependencies.

The following IntelliJ Platform repositories contain not only the IntelliJ Platform releases in stable, snapshot, and nightly versions, but also various dependencies, such as:

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:

Plugin Repositories

It is possible to define a dependency on another plugin using Plugins helpers. Such plugins are resolved as any other dependencies in Gradle using repositories added to the project configuration.

The common repository hosting plugins is JetBrains Marketplace, which can be added with the marketplace() helper. To refer to its plugins, use the plugin(id, version) dependency helper.

It is also possible to resolve plugins from regular Maven repositories other than JetBrains Marketplace. In such a case, refer to them using plugin(id, version, group), which will build group:id:version plugin coordinates.

The third possibility is to use the Custom Plugin Repository with optional authorization credentials provided by defining the URL to the XML listing file, like:

repositories { intellijPlatform { customPluginRepository("https://example.com/plugins.xml", CustomPluginRepositoryType.SIMPLE) { credentials<HttpHeaderCredentials> { name = "Authorization" value = "Automation amFrdWJfdGVzdDotX...MkV2UkFwekFWTnNwZjA=" } } } }

The final plugin archive is eventually resolved using the same credentials used for resolving the listing.

Function

Description

localPlatformArtifacts()

Certain dependencies, such as the local IntelliJ Platform instance 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 are stored in a unique custom Ivy repository directory.

intellijDependencies()

Adds a repository for accessing IntelliJ Platform dependencies.

jetbrainsRuntime()

Adds a repository for accessing JetBrains Runtime releases.

marketplace()

Adds a repository for accessing plugins hosted on JetBrains Marketplace.

customPluginRepository(url, type)

Creates a custom plugin repository from which plugins

Additional Repositories

Function

Description

localPlatformArtifacts()

Certain dependencies, such as the local IntelliJ Platform instance 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 are stored in a unique custom Ivy repository directory.

intellijDependencies()

Adds a repository for accessing IntelliJ Platform dependencies.

jetbrainsRuntime()

Adds a repository for accessing JetBrains Runtime releases.

See also:

Last modified: 26 July 2024