
Multiversioning build-and-test toolkit for compiler plugins: compiles against multiple compiler/IDE versions, ensures source compatibility, expect/actual support, multi-version tests and IDE integration.
[!WARNING]
The DevKit is very experimental! Try it out and give feedback!
For questions, issues, etc, use the KotlinLang Slack #compiler channel, or file a GitHub issue
A DevKit for Kotlin compiler plugin development
ClassNotFoundExceptions or NoSuchMethodErrorsexpect/actual support: Each compiler/IDE version is treated as a separate "platform" (in the KMP sense), so you can expect some methods to exist, and actualize them for particular compiler versionskotlin-compiler-internal-test-framework. Did I mention the tests are multi-versioned too?
Use the compiler-plugin-template's devkit branch.
Alternatively, for a pre-existing project, use the Migration guide
The DevKit supports Kotlin 2.2.20+, Gradle 9.2+, and IntelliJ 2025.2+
We recommended using KEFS during plugin development since it supports hot-reloading of plugins and gracefully handles plugin exceptions.
KEFS supports DevKit-based compiler plugins since 0.4.0.
There's a spec
A significant amount of code, particularly version resolution and gradle plugin testing, is inspired by or copied from Metro
Some Gradle incantations were adapted from TestBalloon, Kotlin Gradle Plugin, and Gradle itself
[!WARNING]
The DevKit is very experimental! Try it out and give feedback!
For questions, issues, etc, use the KotlinLang Slack #compiler channel, or file a GitHub issue
A DevKit for Kotlin compiler plugin development
ClassNotFoundExceptions or NoSuchMethodErrorsexpect/actual support: Each compiler/IDE version is treated as a separate "platform" (in the KMP sense), so you can expect some methods to exist, and actualize them for particular compiler versionskotlin-compiler-internal-test-framework. Did I mention the tests are multi-versioned too?
Use the compiler-plugin-template's devkit branch.
Alternatively, for a pre-existing project, use the Migration guide
The DevKit supports Kotlin 2.2.20+, Gradle 9.2+, and IntelliJ 2025.2+
We recommended using KEFS during plugin development since it supports hot-reloading of plugins and gracefully handles plugin exceptions.
KEFS supports DevKit-based compiler plugins since 0.4.0.
There's a spec
A significant amount of code, particularly version resolution and gradle plugin testing, is inspired by or copied from Metro
Some Gradle incantations were adapted from TestBalloon, Kotlin Gradle Plugin, and Gradle itself