This repository implements an IntelliJ Platform plugin.
The sample plugin adds a My Tool Window tool window with a simple functionality of shuffling a random number.
A generated project contains the following content structure:
.
├── .run/ Predefined Run/Debug Configurations
├── gradle
│ ├── wrapper/ Gradle Wrapper
│ ├── libs.versions.toml Version catalog
├── src Plugin sources
│ └── main
│ ├── kotlin/ Kotlin production sources
│ └── resources/ Plugin resources
│ ├── META-INF/ Plugin configuration file and logo
│ └── messages/ Message bundles
├── .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 This file
└── 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.
The plugin logo is placed in src/main/resources/META-INF/pluginIcon.svg. See Plugin Logo for more
information and logo requirements.
The build.gradle.kts is the core of the project definition. It applies three Gradle plugins:
| Plugin | Description |
|---|---|
org.jetbrains.kotlin.jvm |
Adds Kotlin support |
org.jetbrains.changelog |
Simplifies patching the CHANGELOG.md file |
org.jetbrains.intellij.platform |
The IntelliJ Platform Gradle Plugin |
The intellijPlatform dependencies block selects the IDE to compile against:
intellijIdea("2025.3.5")See Target Versions for more information.
The intellijPlatform dependencies block also contains a dependency on the platform testing framework:
testFramework(TestFrameworkType.Platform)See Testing for more information
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.
Generated plugin ID and name may require adjustment.
These values are generated based on Group ID and Artifact ID provided in the IDE Plugin wizard. It is recommended to
review <id> and <name> elements in the plugin.xml file, and adjust them if needed.
Please note that Gradle properties rootProject.name and project.group don't need to match the <id> and <name>
elements. There is no IntelliJ Platform-related reason they should as they serve different functions.
Within the default project structure, there is a .run directory provided containing predefined Run/Debug
configurations that expose corresponding Gradle tasks:
| Configuration name | Description |
|---|---|
| Run IDE with Plugin | Runs :runIde IntelliJ Platform Gradle Plugin task. Use the Debug icon for plugin debugging. |
| Run Tests | Runs :check Gradle task. |
| Run Verifications | Runs :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.
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.