Riflesso is a plugin for IntelliJ IDEA that provides real-time visualization of Jetpack Compose recompositions for any Kotlin Multiplatform project. It helps developers understand and optimize the performance of their UI by highlighting which functions are recomposing and why.
- Real-time Highlighting: Visualizes recomposition and skip events directly in your editor.
- Composable Call List: Displays a sorted list of all called composables, showing their recomposition and skip counts.
- Parameter Stability Inspection: Brings the powerful parameter state inspection feature from Android Studio to any KMP project, allowing you to see if parameters are
Stable,Unstable,Same, orDifferent.- Kotlin Multiplatform Support: Works seamlessly with Desktop and Android KMP targets.
- Add riflesso plugin:
In the root's build.gradle.kts:
plugins {
id("ru.ivk1800.riflesso") version "<version>" apply false
}In your module's build.gradle.kts:
plugins {
id("org.jetbrains.kotlin.plugin.compose")
id("ru.ivk1800.riflesso") // <- Important! You need to add it after the compose plugin.
}- Add riflesso client:
In your module's build.gradle.kts:
plugins {
implementation("ru.ivk1800.riflesso:client:<version>")
}- You can use a stub for release builds:
plugins {
implementation("ru.ivk1800.riflesso:client-noop:<version>")
}- Call it somewhere, usually in the Application or in your initialization system:
ru.ivk1800.riflesso.Riflesso.initialize()-
Install the plugin for IntelliJ IDEA and click "start".
-
In your module's build.gradle.kts you can disable plugin:
riflesso {
isEnabled = false
}Choose the appropriate version for your version of kotlin:
highlights:
composable function with parameters:
| Platform | Status |
|---|---|
| Android | ✔️ |
| Desktop | ✔️ |
| iOS | ❌ |
| Web | ❌ |
- Run:
gradlew publishToMavenLocal -PincludeComposeApp=false - Run:
gradlew composeApp:jvmRun -DmainClass=MainKt
gradlew publishToMavenCentral -PisDev=false --rerun-tasks

