DataGrip Plugin Development
DataGrip is an IntelliJ Platform-based product. Plugin projects targeting DataGrip can be developed using IntelliJ IDEA.
DataGrip Plugin Setup
Gradle Build Script
Define a dependency using datagrip()
, see Versions link on top of this page for all available versions. See Local IntelliJ Platform IDE Instance for using a local installation.
A dependency on the bundled com.intellij.database
plugin must be added using the bundledPlugin()
helper.
Minimum build.gradle.kts setup:
The configuration of DataGrip plugin projects follows the methods described in Configuring Plugin Projects using the IntelliJ IDEA Product Attribute, and Configuring the plugin.xml File.
The table below summarizes the Gradle IntelliJ Plugin (1.x) attributes to set in the plugin project's Gradle build script. Click on an entry in the table's Attribute column to go to the documentation about that attribute. To see how these attributes appear in a similar Gradle build script for PhpStorm, see Configuring Gradle Build Script Using the IntelliJ IDEA Product Attribute.
| Attribute Value |
---|---|
| |
| |
| |
Path to locally installed target version of DataGrip. For example, for macOS: /Users/$USERNAME$/Library/Application Support/JetBrains/Toolbox/apps/datagrip/ch-0/193.5233.139/DataGrip.app/Contents. |
plugin.xml
The dependency on the DataGrip APIs must be declared in the plugin.xml file. As described in Modules Specific to Functionality table, the <depends>
tags must declare com.intellij.database
.
Note that DataGrip plugins must also declare a dependency on com.intellij.modules.platform
because com.intellij.database
is not recognized as a module. Consequently, without the com.intellij.modules.platform
declaration the plugin is assumed to be a legacy plugin and will not load in DataGrip.
Available DataGrip APIs
Use the Exploring APIs as a Consumer process to identify the libraries in DatabaseTools
. Test your plugin with any version of DataGrip you wish to support.