Kotlin Multiplatform Development 1.6.2 Help

What's new in Compose Multiplatform 1.6.10-beta01

Here are the highlights for this EAP feature release:

See the full list of changes for this release on GitHub.

Support for multimodule projects with Compose Multiplatform resources

In 1.6.10-beta01, you can store resources in any Gradle module and in any source set, as well as publish projects and libraries with resources included.

To enable multimodule support, update your project to Kotlin version 2.0.0-Beta5 or newer and Gradle 7.6 or newer.

Experimental navigation library

The common navigation library, based on Jetpack Compose, is now available. For details, see the documentation.

Key limitations in this version:

Lifecycle library

The common lifecycle library based on Jetpack lifecycle is now available, see the docs for details.

The library was primarily introduced to support common navigation functionality, but it also offers an experimental cross-platform ViewModel implementation, and includes a common LifecycleOwner interface you can implement for your projects.

A notable limitation of this version: Compose Multiplatform does not provide a general ViewModelStoreOwner implementation. To use it beyond a NavHost, you'll need to provide your own implementation. The issue is going to be resolved in the stable 1.6.10 release.

Known issues: bugs

  • A crash at startup on devices with iOS version older than 17 due to a bug.

  • inline fun <reified VM> viewModel(...) is not available in common code due to a compiler bug.

    You can use this overload instead:

    fun <VM> viewModel(KClass, ...)
Last modified: 18 April 2024