Changed:
- The deprecated
iosX64,macosX64,tvosX64, andwatchosX64targets have been removed.
2.2.0 - 2025-09-24
Changed:
- Use the AndroidX Compose runtime which is now fully multiplatform. A dependency constraint to the JetBrains Compose runtime version 1.9.0 has been added, which is the first version that is empty and itself now points to AndroidX.
- Android variant now has a minimum SDK level of 23.
- In-development snapshots are now published to the Central Portal Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/.
2.1.0 - 2025-04-11
New:
- Add
SnapshotNotifierenum to control whether Molecule automatically sends snapshot apply notifications. If you are using Molecule with another Compose-based library in a single application, you may want to disable our snapshot notification. See the enum for details on when that is appropriate. Additionally, theapp.cash.molecule.snapshotNotifiersystem property can be set to one of the enum entry names to control the default process-wide.
Changed:
- Any specified additional coroutine context elements will now be honored in the coroutine used internally with
RecompositionMode.Immediateto send frames and cause recomposition to occur. This is observable, most notably, when aCoroutineDispatcheris included, as now recompositions which occur after the first, synchronous one will occur on that dispatcher.
Fixed:
- Correct calculation of frame nano time for native Windows and native Linux targets.
2.0.0 - 2024-05-28
New:
- Support for Kotlin 2.0.0!
Changed:
- Remove our Gradle plugin in favor of JetBrains' (see below for more).
Fixed:
- Mac OS
DisplayLinkClockwas updated to correctly use a "static" function for pointer-passing toCVDisplayLink, as newly-enforced by Kotlin 2.0. This should not cause a behavior change.
Note: This release is otherwise binary-compatible with the 1.x versions. The major version bump is due to the build change only.
This version of Molecule removes the custom Gradle plugin in favor of the official JetBrains Compose compiler plugin which ships as part of Kotlin itself.
Each module in which you had previously applied the app.cash.molecule plugin should be changed to apply org.jetbrains.kotlin.plugin.compose instead.
The Molecule runtime will no longer be added as a result of the plugin change, and so any module which references Molecule APIs like launchMolecule should apply the app.cash.molecule:molecule-runtime dependency.
For posterity, the Kotlin version compatibility table and compiler version customization for our old Molecule Gradle plugin will be archived here:
Molecule 1.x Gradle plugin Kotlin compatibility table
Since Kotlin compiler plugins are an unstable API, certain versions of Molecule only work with certain versions of Kotlin.
| Kotlin | Molecule |
|---|---|
| 1.9.24 | 1.4.3 |
| 1.9.23 | 1.4.2 |
| 1.9.22 | 1.3.2 - 1.4.1 |
| 1.9.21 | 1.3.1 |
| 1.9.20 | 1.3.0 |
| 1.9.10 | 1.2.1 |
| 1.9.0 | 1.1.0 - 1.2.0 |
| 1.8.22 | 0.11.0 - 1.0.0 |
| 1.8.21 | 0.10.0 |
| 1.8.20 | 0.9.0 |
| 1.8.10 | 0.8.0 |
| 1.8.0 | 0.7.0 - 0.7.1 |
| 1.7.20 | 0.6.0 - 0.6.1 |
| 1.7.10 | 0.4.0 - 0.5.0 |
| 1.7.0 | 0.3.0 - 0.3.1 |
| 1.6.10 | 0.2.0 |
| 1.5.31 | 0.1.0 |
Molecule 1.x Gradle plugin Compose compiler customization instructions
Each version of Molecule ships with a specific JetBrains Compose compiler version which works with a single version of Kotlin (see version table above). Newer versions of the Compose compiler or alternate Compose compilers can be specified using the Gradle extension.
To use a new version of the JetBrains Compose compiler version:
molecule {
kotlinCompilerPlugin.set("1.4.8")
}To use an alternate Compose compiler dependency:
molecule {
kotlinCompilerPlugin.set("com.example:custom-compose-compiler:1.0.0")
}1.4.3 - 2024-05-15
New:
- Support for Kotlin 1.9.24
This version works with Kotlin 1.9.24 by default.
1.4.2 - 2024-03-27
New:
- Support for Kotlin 1.9.23
Changed:
- Disable klib signature clash checks for JS compilations. These occasionally occur as a result of Compose compiler behavior, and are safe to disable (the first-party JetBrains Compose Gradle plugin also disables them).
This version works with Kotlin 1.9.23 by default.
1.4.1 - 2024-02-28
New:
- Support for
linuxArm64andwasmJstargets.
1.4.0 - 2024-02-27
Changed:
- Disable decoy generation for JS target to make compatible with JetBrains Compose 1.6. This is an ABI-breaking change, so all Compose-based libraries targeting JS will also need to have been recompiled.
This version works with Kotlin 1.9.22 by default.
1.3.2 - 2024-01-02
New:
- Support for Kotlin 1.9.22
This version works with Kotlin 1.9.22 by default.
1.3.1 - 2023-11-25
New:
- Support for Kotlin 1.9.21
This version works with Kotlin 1.9.21 by default.
1.3.0 - 2023-10-31 🎃
New:
- Add
CoroutineContextparameter tolaunchMoleculeto contribute elements to the combined context that is used for running Compose. - Support for Kotlin 1.9.20
Changed:
- Removed now-unsupported
watchosX86target.
This version works with Kotlin 1.9.20 by default.
1.2.1 - 2023-09-14
New:
- Support for Kotlin 1.9.10
- Switch to JetBrains Compose compiler 1.5.2 (based on AndroidX Compose compiler 1.5.3)
This version works with Kotlin 1.9.10 by default.
1.2.0 - 2023-08-09
New:
-
Support for specifying custom Compose compiler versions. This will allow you to use the latest version of Molecule with newer versions of Kotlin than it explicitly supports.
See the README for more information.
Fixed:
- Ensure frame times sent by
RecompositionMode.Immediatealways increase. Previously, when targeting JS, the same frame time could be seen since the clock only has millisecond precision. Since the frame time is in nanoseconds, synthetic nanosecond offsets will be added to ensure each timestamp is strictly greater than the last. - Perform teardown of the composition on cancellation within an existing coroutine rather than in a job completion listener. This ensures it executes on the same dispatcher as the rest of the system, rather than on the canceling caller's thread.
1.1.0 - 2023-07-20
New:
- Support for Kotlin 1.9.0
- Switch to JetBrains Compose compiler 1.5.0 (based on AndroidX Compose compiler 1.5.0)
1.0.0 - 2023-07-19
Changed:
RecompositionClockis now namedRecompositionModeto better reflect that it is not itself the clock, but the mode by which Molecule will perform recomposition. A clock is always used internally as that is the underlying mechanism of Compose.- Darwin frame clock and the internal frame clock used with
RecompositionMode.Immediatenow correctly send actual frame times.
0.11.0 - 2023-06-30
New:
- Support for Kotlin 1.8.22
- Switch to JetBrains Compose compiler 1.4.8 (AndroidX Compose compiler 1.4.8)
0.10.0 - 2023-06-26
New:
- Support for Kotlin 1.8.21
- Update to JetBrains Compose runtime 1.4.1 (AndroidX Compose runtime 1.4.3).
- Switch to JetBrains Compose compiler 1.4.7 (AndroidX Compose compiler 1.4.7)
0.9.0 - 2023-04-12
New:
- Support for Kotlin 1.8.20
- Update to JetBrains Compose runtime 1.4.0 (AndroidX Compose runtime 1.4.0).
- Switch to JetBrains Compose compiler 1.4.5 (as yet unreleased AndroidX Compose compiler, probably 1.4.5)
0.8.0 - 2023-03-09
New:
- Support for Kotlin 1.8.10
- Update to JetBrains Compose runtime 1.3.1 (AndroidX Compose runtime 1.2.1).
- Switch to JetBrains Compose compiler 1.3.2.1 (AndroidX Compose compiler 1.3.2 + JS fix)
0.7.1 - 2023-02-20
New:
- Add
WindowAnimationFrameClockfor use in browser-based JS environments.
Changed:
- Switch to JetBrains Compose compiler which has better support for JS and native targets.
0.7.0 - 2023-01-17
New:
- Support for Kotlin 1.8.0
- Switch (back) to AndroidX Compose compiler 1.4.0
0.6.1 - 2022-11-16
New:
- Add support for
watchosArm32andwatchosX86native targets.
0.6.0 - 2022-11-08
New:
- Support for Kotlin 1.7.20
- Update to JetBrains Compose runtime 1.2.1 (AndroidX Compose runtime 1.2.1).
- Switch to JetBrains Compose compiler 1.3.2.1 (AndroidX Compose compiler 1.3.2 + JS fix)
Fixed:
- When applying the Compose compiler plugin to Kotlin/JS targets, ensure decoys are used.
- Add
cacheKind=noneGradle configuration which ensures downstream Kotlin/Native projects can link.
0.5.0 - 2022-10-13
New:
- Update to JetBrains Compose runtime 1.2.0 (this uses AndroidX Compose runtime 1.2.1).
- Add iOS, MacOS, tvOS, watchOS, linux, and windows targets for Kotlin/Native.
Changed:
- The 'molecule-testing' artifact has been removed.
0.5.0-beta01 - 2022-09-16
New:
- Update to JetBrains Compose runtime 1.2.0-beta01 (this uses AndroidX Compose runtime 1.2.1).
- Add iOS, MacOS, tvOS, watchOS, linux, and windows targets for Kotlin/Native.
Changed:
- The 'molecule-testing' artifact has been removed.
0.4.0 - 2022-08-10
New:
- Update to Compose compiler 1.3.0 which supports Kotlin 1.7.10.
Fixed:
- Prevent "Trying to call 'getOrThrow' on a failed channel result: Failed" exceptions when using the immediate recompose clock.
0.4.0-beta01 - 2022-07-27
New:
- Update to Compose compiler 1.3.0-beta01 which supports Kotlin 1.7.10.
0.3.1 - 2022-08-10
Fixed:
- Prevent "Trying to call 'getOrThrow' on a failed channel result: Failed" exceptions when using the immediate recompose clock.
0.3.0 - 2022-07-27
New:
- Enable Kotlin multiplatform usage on JVM and JS targets (in addition to Android). All native targets are blocked on JetBrains' Compose runtime supporting them (with a stable release).
- Update to Compose compiler 1.2.0 which supports Kotlin 1.7.0.
- Add
RecomposeClockparameter to bothmoleculeFlowandlaunchMoleculewhich allows choosing between a frame-based clock for recomposition or a clock which immediately recomposes for any change. - The 'molecule-testing' library is deprecated. The recommendation is to use the new immediate clock mode and Turbine. If you have a use case which cannot be handled by this change please comment on this issue.
0.2.0 - 2022-02-09
New:
- Update to Compose 1.1.0 which supports Kotlin 1.6.10
Fixed:
- Explicitly dispose internal
CompositionallowingDisposableEffects to fire.
0.1.0 - 2021-11-10
Initial release