Hey, folks!
Behind the scenes, we’re working on making the plugin configuration more approachable and cleaner to you.
Over the last years, the Plugin Template was providing you with an opinionated solution and best practices. As for now, we’re reviewing that in order to prepare a setup friendly to the Plugin Module v2 — and having so many files hit us hard. Seems like the Gradle part is way too complicated.
Let’s take a look at the current Plugin Template setup with two submodules added on its top:
settings.gradle.kts
rootProject.name = "IntelliJ Platform Plugin Template"
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
include("shared")
include("css")
build.gradle.kts
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
plugins {
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
}
group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()
// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(21)
}
// Configure project's dependencies
repositories {
mavenCentral()
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
intellijPlatform {
defaultRepositories()
}
}
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/version_catalogs.html
dependencies {
testImplementation(libs.junit)
testImplementation(libs.opentest4j)
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
intellijIdea(providers.gradleProperty("platformVersion"))
pluginModule(implementation(project(":shared")))
pluginModule(implementation(project(":css")))
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
// Module Dependencies. Uses `platformBundledModules` property from the gradle.properties file for bundled IntelliJ Platform modules.
bundledModules(providers.gradleProperty("platformBundledModules").map { it.split(',') })
testFramework(TestFrameworkType.Platform)
}
}
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
name = providers.gradleProperty("pluginName")
version = providers.gradleProperty("pluginVersion")
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
with(it.lines()) {
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
}
}
val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
.withHeader(false)
.withEmptySections(false),
Changelog.OutputType.HTML,
)
}
}
ideaVersion {
sinceBuild = providers.gradleProperty("pluginSinceBuild")
}
}
signing {
certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN")
privateKey = providers.environmentVariable("PRIVATE_KEY")
password = providers.environmentVariable("PRIVATE_KEY_PASSWORD")
}
publishing {
token = providers.environmentVariable("PUBLISH_TOKEN")
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#specifying-a-release-channel
channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
}
pluginVerification {
ides {
recommended()
}
}
}
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
versionPrefix = ""
}
// Configure Gradle Kover Plugin - read more: https://kotlin.github.io/kotlinx-kover/gradle-plugin/#configuration-details
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}
tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}
publishPlugin {
dependsOn(patchChangelog)
}
}
intellijPlatformTesting {
runIde {
register("runIdeForUiTests") {
task {
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Drobot-server.port=8082",
"-Dide.mac.message.dialogs.as.sheets=false",
"-Djb.privacy.policy.text=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}
plugins {
robotServerPlugin()
}
}
}
}
shared/build.gradle.kts
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.intelliJPlatformModule)
}
kotlin {
jvmToolchain(21)
}
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
intellijIdea(providers.gradleProperty("platformVersion"))
}
}
css/build.gradle.kts
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.intelliJPlatformModule)
}
kotlin {
jvmToolchain(21)
}
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
implementation(project(":shared"))
intellijPlatform {
intellijIdea(providers.gradleProperty("platformVersion"))
bundledPlugin("com.intellij.css")
}
}
gradle.properties
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
pluginGroup = org.jetbrains.plugins.template
pluginName = IntelliJ Platform Plugin Template
pluginRepositoryUrl = https://github.com/JetBrains/intellij-platform-plugin-template
# SemVer format -> https://semver.org
pluginVersion = 2.4.1
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 252
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformVersion = 2025.2.6.1
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins =
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins =
# Example: platformBundledModules = intellij.spellchecker
platformBundledModules =
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 9.4.1
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
org.gradle.configuration-cache = true
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true
gradle/libs.versions.toml
[versions]
# libraries
junit = "4.13.2"
opentest4j = "1.3.0"
# plugins
changelog = "2.5.0"
intelliJPlatform = "2.13.1"
kotlin = "2.3.20"
kover = "0.9.7"
qodana = "2025.3.2"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" }
[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
intelliJPlatformModule = { id = "org.jetbrains.intellij.platform.module", version.ref = "intelliJPlatform" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
Pretty a lot, isn’t it? The above six files includes:
- The main
settings.gradle.ktsdefines twosharedandcssmodules build.gradle.ktsdefines repositories, dependencies on IntelliJ Platform, modules, libraries, initial IntelliJ Platform configuration, other plugins setupshared/build.gradle.kts— just a dependency in IntelliJ Platformcss/build.gradle.kts— dependency on IntelliJ Platform and css plugin- some setup exposed as Gradle properties
- Gradle Version Catalog
The usefullness of the last two is debatable. There’s also a lot of noise around IntelliJ Platform.
In the upcoming IntelliJ Platform Gradle Plugin 2.14.0, I have introduced several defaults, so we can skip a repeatable code, like Plugin Verifier’s recommended() helper or passing environment variables to signing/publishing properties.
That with dropping Version Catalog along with gradle.properties, and introducing submodules block together with dependencyResolutionManagement + pluginManagement inside settings.gradle.kts can result in a pretty slim setup:
settings.gradle.kts
import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform
pluginManagement {
plugins {
id("org.jetbrains.kotlin.jvm") version "2.3.20"
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
id("org.jetbrains.intellij.platform.settings") version "2.14.0"
}
dependencyResolutionManagement {
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
}
rootProject.name = "IntelliJ Platform Plugin Template"
include("shared")
include("css")
- with
pluginManagement, we’re defining globally the Kotlin Gradle Plugin version. - the
pluginsloads IntelliJ Platform Gradle Plugin Settings that allows to - define globally all the IntelliJ Platform repositories required for the project
build.gradle.kts
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.intellij.platform")
id("org.jetbrains.changelog") version "2.5.0"
id("org.jetbrains.qodana") version "2025.3.2"
id("org.jetbrains.kotlinx.kover") version "0.9.7"
}
// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(21)
}
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/version_catalogs.html
dependencies {
testImplementation("junit:junit:4.13.2")
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
intellijIdea("2026.1")
pluginModule(implementation(project(":shared")))
pluginModule(implementation(project(":css")))
testFramework(TestFrameworkType.Platform)
}
}
subprojects {
plugins.apply("org.jetbrains.kotlin.jvm")
plugins.apply("org.jetbrains.intellij.platform.module")
kotlin {
jvmToolchain(21)
}
dependencies {
intellijPlatform {
intellijIdea("2025.3")
}
}
}
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
with(it.lines()) {
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
}
}
val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
.withHeader(false)
.withEmptySections(false),
Changelog.OutputType.HTML,
)
}
}
}
}
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = "https://github.com/JetBrains/intellij-platform-plugin-template"
versionPrefix = ""
}
// Configure Gradle Kover Plugin - read more: https://kotlin.github.io/kotlinx-kover/gradle-plugin/#configuration-details
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}
tasks {
publishPlugin {
dependsOn(patchChangelog)
}
}
intellijPlatformTesting {
runIde {
register("runIdeForUiTests") {
task {
jvmArgumentProviders += CommandLineArgumentProvider {
listOf(
"-Drobot-server.port=8082",
"-Dide.mac.message.dialogs.as.sheets=false",
"-Djb.privacy.policy.text=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}
plugins {
robotServerPlugin()
}
}
}
}
- introduced
submodule {}to configure Koltin JVM Toolchain, plugins, and dependency on the IntelliJ Platform for all submodules at once - the
repositories {}block is now dropped - loaded Gradle plugins and dependencies no longer use Version Catalog and define versions directly
pluginConfiguration.nameremoved as we already define plugin name inplugin.xmlpluginConfiguration.versionremoved as it inherits from top-levelversionideaVersion.sinceBuildremoved as we were setting it to major build number which is now defaultideaVersion.signingandideaVersion.publishingremoved as by default those properties read from mentioned env variables by defaultpluginVerification.ides.recommended()is applied by default if nothing is specifiedtasks.wrapperremoved as it complicates flow when working with i.e. Dependabot or Renovate. Also, it’s pretty easy to use CLI for updating Gradle Wrapper.
shared/build.gradle.kts
Build file is gone as everything is defined via root build file.
shared/build.gradle.kts
dependencies {
implementation(project(":shared"))
intellijPlatform {
bundledPlugin("com.intellij.css")
}
}
Only additional setup is now declared here.
gradle.properties
group = org.jetbrains.plugins.template
version = 2.4.1
kotlin.stdlib.default.dependency = false
org.gradle.configuration-cache = true
org.gradle.caching = true
This file defines only the project version and necessary Gradle flags.
gradle/libs.versions.toml
Gradle Version Catalog is removed in favor of declaring everything in place. This can’t be used in settings.gradle.kts easily anyway.
If we strip the main build.gradle.kts file from Kover, Qodana, and Changelog Gradle plugins and provide the plugin description right in the plugin.xml file, we may end up with:
build.gradle.kts
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
plugins {
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.intellij.platform")
}
kotlin {
jvmToolchain(21)
}
dependencies {
testImplementation("junit:junit:4.13.2")
intellijPlatform {
intellijIdea("2026.1")
pluginModule(implementation(project(":shared")))
pluginModule(implementation(project(":css")))
testFramework(TestFrameworkType.Platform)
}
}
subprojects {
plugins.apply("org.jetbrains.kotlin.jvm")
plugins.apply("org.jetbrains.intellij.platform.module")
kotlin {
jvmToolchain(21)
}
dependencies {
intellijPlatform {
intellijIdea("2025.3")
}
}
}
And here comes the question — what do you think of such a change? Should we keep gradle.properties and Gradle Version Catalog? What about Kover, Qodana, and Changelog? Should we keep reading README.md.
Please, join with your thoughts — let’s define together the first impressions for all newcomers joining the plugin development journey!
Thanks, Jakub