Skip to content

Releases: cashapp/molecule

2.0.0

28 May 17:39
Compare
Choose a tag to compare

New:

  • Support for Kotlin 2.0.0!

Changed:

  • Remove our Gradle plugin in favor of JetBrains' (see below for more).

Fixed:

  • Mac OS DisplayLinkClock was updated to correctly use a "static" function for pointer-passing to CVDisplayLink, 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.

Gradle plugin removed

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

15 May 13:53
Compare
Choose a tag to compare

New:

  • Support for Kotlin 1.9.24

This version works with Kotlin 1.9.24 by default.

1.4.2

27 Mar 14:38
Compare
Choose a tag to compare

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

28 Feb 18:31
Compare
Choose a tag to compare

New:

  • Support for linuxArm64 and wasmJs targets.

1.4.0

27 Feb 18:33
Compare
Choose a tag to compare

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

02 Jan 21:18
Compare
Choose a tag to compare

New:

  • Support for Kotlin 1.9.22

This version works with Kotlin 1.9.22 by default.

1.3.1

26 Nov 00:59
Compare
Choose a tag to compare

New:

  • Support for Kotlin 1.9.21

This version works with Kotlin 1.9.21 by default.

1.3.0

31 Oct 20:29
Compare
Choose a tag to compare

New:

  • Add CoroutineContext parameter to launchMolecule to contribute elements to the combined context that is used for running Compose.
  • Support for Kotlin 1.9.20

Changed:

  • Removed now-unsupported watchosX86 target.

This version works with Kotlin 1.9.20 by default.

1.2.1

14 Sep 18:24
Compare
Choose a tag to compare

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

09 Aug 17:28
Compare
Choose a tag to compare

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.Immediate always 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.