Skip to content

ivk1800/Riflesso

Repository files navigation

Riflesso

Maven Central Version

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.

Features

  • 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, or Different.
  • Kotlin Multiplatform Support: Works seamlessly with Desktop and Android KMP targets.

Usage

  • 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
}

Versions

Choose the appropriate version for your version of kotlin:

https://mvnrepository.com/artifact/ru.ivk1800.riflesso

🎬 Demo

highlights:

Demo of recompositions

composable function with parameters:

Demo of recompositions

Platforms

Platform Status
Android ✔️
Desktop ✔️
iOS
Web

Run demo

  1. Run: gradlew publishToMavenLocal -PincludeComposeApp=false
  2. Run: gradlew composeApp:jvmRun -DmainClass=MainKt

Publish

gradlew publishToMavenCentral -PisDev=false --rerun-tasks

About

Riflesso is a plugin for IntelliJ IDEA that provides real-time visualization of Jetpack Compose recompositions.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages