Compose HotSwan

One save rebuilds the whole screen on Android, the iOS simulator and Compose Desktop at once.
Compose HotSwan is hot reload for Jetpack Compose and Compose Multiplatform. Edit Kotlin in Android
Studio or IntelliJ IDEA, save, and the change appears in the app that is already running on your
Android device or emulator, in your Compose Desktop window, or on the iOS simulator. Structural edits
apply in place, and your navigation stack, scroll position and remember state survive the reload.
Full documentation lives at hotswan.dev/docs.
How it works
HotSwan has three parts: a Gradle plugin, a runtime inside your debug app, and a front end that
starts reloads: the IDE plugin, or the hotswan command line (see below).
- The Gradle plugin applies HotSwan's Kotlin compiler plugins to the compilations it can reload
(Android debug variants, the Compose Desktop JVM target, the iOS simulator target) and adds the
matching runtime to the app. Android release variants are left alone.
- When you save, the IDE plugin (or
hotswan reload) compiles the changed module incrementally,
keeps only the declarations that differ from what the running app has, and sends them to the app.
- The runtime executes the new code with its own interpreter instead of asking the virtual machine
to redefine loaded classes, which is why structural edits can apply in place. It then recomposes
only the affected scopes.
A literal-only edit skips step 2 entirely: the IDE diffs the source and patches the value in the
running app. Kotlin/Native has no in-place code swap, so the iOS simulator uses its own delivery
tiers; see hotswan-ios/README.md.
Sponsors
The sponsors listed below support the development of Compose HotSwan as an open-source project.
Many thanks to all of them for their support!

Stream builds chat, video, feeds and moderation into your Android app with
customizable Jetpack Compose SDKs that scale to billions of users.
Features