Back to Intellij Community

IntelliJ Platform Plugin Template

plugins/devkit/devkit-core/resources/assets/devkit-README.md

2025.3-rc-25.7 KB
Original Source

IntelliJ Platform Plugin Template

Plugin template structure

A generated project contains the following content structure:

.
├── .run/                   Predefined Run/Debug Configurations
├── build/                  Output build directory
├── gradle
│   ├── wrapper/            Gradle Wrapper
├── src                     Plugin sources
│   ├── main
│   │   ├── kotlin/         Kotlin production sources
│   │   └── resources/      Resources - plugin.xml, icons, messages
├── .gitignore              Git ignoring rules
├── build.gradle.kts        Gradle build configuration
├── gradle.properties       Gradle configuration properties
├── gradlew                 *nix Gradle Wrapper script
├── gradlew.bat             Windows Gradle Wrapper script
├── README.md               README
└── settings.gradle.kts     Gradle project settings

In addition to the configuration files, the most crucial part is the src directory, which contains our implementation and the manifest for our plugin – plugin.xml.

[!NOTE] To use Java in your plugin, create the /src/main/java directory.

Plugin configuration file

The plugin configuration file is a plugin.xml file located in the src/main/resources/META-INF directory. It provides general information about the plugin, its dependencies, extensions, and listeners.

You can read more about this file in the Plugin Configuration File section of our documentation.

If you're still not quite sure what this is all about, read our introduction: What is the IntelliJ Platform?

$H$H Predefined Run/Debug configurations

Within the default project structure, there is a .run directory provided containing predefined Run/Debug configurations that expose corresponding Gradle tasks:

Configuration nameDescription
Run PluginRuns :runIde IntelliJ Platform Gradle Plugin task. Use the Debug icon for plugin debugging.
Run TestsRuns :test Gradle task.
Run VerificationsRuns :verifyPlugin IntelliJ Platform Gradle Plugin task to check the plugin compatibility against the specified IntelliJ IDEs.

[!NOTE] You can find the logs from the running task in the idea.log tab.

Publishing the plugin

[!TIP] Make sure to follow all guidelines listed in Publishing a Plugin to follow all recommended and required steps.

Releasing a plugin to JetBrains Marketplace is a straightforward operation that uses the publishPlugin Gradle task provided by the intellij-platform-gradle-plugin.

You can also upload the plugin to the JetBrains Plugin Repository manually via UI.