Prerequisites
Ensure your project meets these minimum version requirements:Kotlin
Version 2.1.20 or higher
Compose Compiler
Version 2.1.20 or higher
Compose Multiplatform
Version 1.8.2 or higher
Java Target
Java 21 or earlier (for JetBrains Runtime compatibility)
Recommended IDE Setup
For the best development experience:- IntelliJ IDEA 2025.2.2 or higher, or Android Studio Otter 2025.2.1 or higher
- Kotlin Multiplatform IDE plugin installed
Installation Methods
There are two ways to set up Compose Hot Reload:New Project
Create a project with hot reload from the start
Existing Project
Add hot reload to your current project
New Project from Scratch
Create a new project
Follow the Kotlin Multiplatform quickstart guide to set up your environment and create a project.
Be sure to select the desktop target when creating the project, as Compose Hot Reload requires a JVM target.
Configure the hot reload plugin
Once your project is created, follow the steps in Add to Existing Project to enable hot reload.
Add to Existing Project
Step 1: Update Version Catalog
Add the Compose Hot Reload plugin to your version catalog ingradle/libs.versions.toml:
gradle/libs.versions.toml
Step 2: Apply to Parent Project
In your parent project’sbuild.gradle.kts, add the plugin with apply false to prevent it from being loaded multiple times in subprojects:
build.gradle.kts
Step 3: Enable in Application Module
In thebuild.gradle.kts of your application subproject, apply the hot reload plugin:
Step 4: Configure Main Class
You can configure the main class in two ways:- Compose Desktop Block (Recommended)
- Hot Reload Task
- Command Line Argument
build.gradle.kts
Step 5: Sync Gradle
Click the Sync Gradle Changes button in your IDE to synchronize the configuration.JetBrains Runtime Provisioning
An installation of the JetBrains Runtime (JBR) is required to run Compose Hot Reload. There are three ways to provide it:Option 1: IDE Plugin (Recommended)
Install the Kotlin Multiplatform plugin
Install the Kotlin Multiplatform IDE plugin in IntelliJ IDEA or Android Studio.
Option 2: Gradle Toolchain Resolution
Configure Gradle to automatically download the JetBrains Runtime by adding the Foojay resolver to yoursettings.gradle.kts:
settings.gradle.kts
Option 3: Automatic JBR Provisioning (Experimental)
Enable automatic provisioning by setting the property in yourgradle.properties:
gradle.properties
Custom JVM Target Names
If you define a custom JVM target name in your Kotlin configuration, the hot reload task names will reflect that:build.gradle.kts
:hotRunDesktop(instead of:hotRunJvm):hotRunDesktopAsync
Available Gradle Tasks
The Compose Hot Reload plugin automatically creates the following tasks:Run Tasks
Multiplatform Projects
:hotRunJvm- Run with hot reload:hotRunJvmAsync- Async variant
Kotlin/JVM Projects
:hotRun- Run with hot reload:hotRunAsync- Async variant
Reload Tasks (Explicit Mode Only)
:reload- Reload all currently running applications:hotReloadJvmMain- Reload applications using thejvmMainsource set
Command-Line Arguments
All hot reload run tasks support these arguments:| Argument | Description | Example |
|---|---|---|
--mainClass <FQN> | Specify the main class to run | ./gradlew :app:hotRunJvm --mainClass com.example.MainKt |
--autoReload / --auto | Enable automatic reloading on file changes | ./gradlew :app:hotRunJvm --autoReload |
--no-autoReload / --no-auto | Disable automatic reloading | ./gradlew :app:hotRunJvm --no-auto |
Using Developer Builds
To try the latest changes in Compose Hot Reload before they’re officially released, you can use dev builds:settings.gradle.kts
dev version in your version catalog or plugin declaration.
Multi-Module Projects
Compose Hot Reload works seamlessly across project modules:Apply plugin to each module
Apply the hot reload plugin to each module that contains reloadable code:
widgets/build.gradle.kts
IDE Configuration
Run Configuration Setup
If you don’t have the Kotlin Multiplatform IDE plugin installed, you can manually create Gradle run configurations:Customize Reload Trigger
You can modify the reload trigger behavior in Settings | Tools | Compose Hot Reload.Troubleshooting
JetBrains Runtime not found
JetBrains Runtime not found
Solutions:
- Install the Kotlin Multiplatform IDE plugin
- Add the Foojay resolver to
settings.gradle.kts - Enable experimental auto-provisioning with the
compose.reload.jbr.autoProvisioningEnabledproperty
Task names don't match documentation
Task names don't match documentation
If you’re using a custom JVM target name, the task names will differ:
Plugin applied multiple times
Plugin applied multiple times
Make sure you use
apply false in the parent project:Android-only project compatibility
Android-only project compatibility
Compose Hot Reload is designed for Compose Multiplatform. For Android-only projects:
- Switch from the Jetpack Compose plugin to the Compose Multiplatform plugin
- Add a separate Gradle module with a JVM target
- Configure hot reload in that module
Desktop-only app without IDE run button
Desktop-only app without IDE run button
Next Steps
Quickstart Guide
Build your first hot reload app
Report Issues
Submit feedback or report bugs