Configuring IntelliJ Platform Gradle Plugin (2.x)
This section presents a short overview of the most important Gradle plugin configuration elements to achieve commonly desired functionality.
For more advanced options and topics, see:
IntelliJ Platform Gradle Plugin (2.x) reference
Keep Up To Date
IntelliJ Platform Gradle Plugin (2.x) and Gradle build system are constantly developed, and every new release brings important bug fixes, new features, and improvements that make the development more efficient.
It is strongly recommended to keep updating both Gradle and IntelliJ Platform Gradle Plugin to the latest versions. Newer IDE releases might not be supported fully in older releases of the IntelliJ Platform Gradle Plugin.
Setup
See Configuration for the necessary declaration of repositories.
Target Platform and Dependencies
If a matching version of the specified IntelliJ Platform is not present on the local machine, the Gradle plugin will download it. IntelliJ IDEA then indexes the build and any associated source code and JetBrains Java Runtime.
To build a plugin for more than one target platform version, see Targeting Multiple IDE Versions for important notes.
IntelliJ Platform Configuration
The target IDE platform is set in the dependencies {}
block, see Setting Up IntelliJ Platform for a minimal sample.
Target Platforms lists all available extension functions for known target IDE platforms.
Plugin Dependencies
IntelliJ Platform plugin projects may depend on either bundled or third-party plugins defined in the dependencies {}
block, see Plugins for details.
The runtime dependency must be added in the Plugin Configuration (plugin.xml) file as described in Plugin Dependencies.
Run IDE Task
By default, the runIde
task will use the same version of the IntelliJ Platform for the IDE Development instance as was used for building the plugin.
Verifying Plugin
The following tasks allow running integrity and compatibility tests:
verifyPlugin
- runs the Plugin Verifier tool to check the binary compatibility with the specified IDE buildsverifyPluginStructure
— validates completeness and contents of plugin.xml descriptors as well as the plugin's archive structureverifyPluginProjectConfiguration
— validates the plugin project configuration
Publishing Plugin
Review the Publishing a Plugin page before using the publishPlugin
task.