What's new in Compose Multiplatform 1.6.10
Here are the highlights for this feature release:
See the full list of changes for this release on GitHub.
Gradle plugin
org.jetbrains.compose
, version 1.6.10. Based on Jetpack Compose libraries:Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.8.0
. Based on Jetpack Lifecycle 2.8.0.Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.7.0-alpha07
. Based on Jetpack Navigation 2.7.7.
Starting with Kotlin 2.0.0, Compose Multiplatform requires the new Compose compiler Gradle plugin. See the migration guide for details.
The bulk of the resource library API is now considered stable.
Starting with Compose Multiplatform 1.6.10, 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 or newer and Gradle 7.6 or newer.
You can now fine-tune the Res
class generation in your project: alter the modality and the assigned package for the class, as well as choose conditions for generating it: always, never or only with explicit dependency on the resource library.
See the documentation section for details.
The new getUri()
function allows you to pass platform-dependent URI of a resource to external libraries, so that they can access the file directly. See documentation for details.
You can now define plurals (quantity strings) along with other multiplatform string resources. See documentation for details.
Language qualifiers now support alpha-3 (ISO 639-2) codes for locales.
You can try out two functions that allow fetching fonts and images as byte arrays: getDrawableResourceBytes()
and getFontResourceBytes()
. These functions are aimed to help with accessing multiplatform resources from third-party libraries.
See details in the pull request.
The common navigation library, based on Jetpack Compose, is now available. For details, see the documentation.
Key limitations in this version:
Deep links (handling or following them) are not supported yet.
The BackHandler function and predictive back gestures are supported only on Android.
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.
Compose Multiplatform also provides a general ViewModelStoreOwner
implementation.
Kotlin 2.0.0 came out along with the new Gradle plugin for the Compose compiler. To use Compose Multiplatform with the latest compiler version, apply the plugin to the modules in your project (see the migration guide for details).
The BasicTextField2
Compose component is now supported on a base level for desktop targets. Use it if your project absolutely requires it, or to test it out, but keep in mind that there may be uncovered edge cases. For example, BasicTextField2
does not support IME events right now, so you won't be able to use virtual keyboards for Chinese, Japanese, or Korean.
Full support for the component and support for other platforms is planned in the Compose Multiplatform 1.7.0 release.
To avoid your dialog windows being overwritten, you can now use the alwaysOnTop
flag for a DialogWindow
composable.
See the pull request for details.
In this release:
dialogs and popups are properly integrated with accessibility features,
interop views created using
UIKitView
andUIKitViewController
are now reachable by Accessibility Services,LiveRegion
semantics are supported by the accessibility API,accessibility scrolling is supported,
HapticFeedback
is supported.
Compose Multiplatform selection containers on iOS now emulate the native magnifying tool.

Behavior of Dialog
composables is now aligned with Android: when a software keyboard appears on screen, dialogs are centered considering the effective height of the application window. There is an option to disable this, with the DialogProperties.useSoftwareKeyboardInset
property.
The experimental Compose Multiplatform for Web is now in Alpha:
Most of the Web functionality mirrors Compose Multiplatform for Desktop.
The team is committed to bringing the Web platform to release.
Next step, a thorough browser adaptation of most components.
Follow the first app tutorial to see how to set up and run a web app with shared UI code.
The web target for Compose Multiplatform now has basic support for virtual (IME) keyboards.
In previous versions, it wasn't possible to upload a macOS app to the App Store without including an Intel version. You can now set a minimum macOS version for your app among platform-specific Compose Multiplatform options:
compose.desktop {
application {
nativeDistributions {
macOS {
minimumSystemVersion = "12.0"
}
}
}
}
See the pull request for details.
You can now create uber JARs (complex packages with JARs of the application and all dependencies) using ProGuard Gradle tasks.
See the minification and obfuscation tutorial for details.
You may experience the org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: ...
error after switching from Kotlin 1.9.x to 2.0.0 (or the other way around). To resolve this, delete all of the build
directories in your project. This includes directories located in the root and module directories of your project.
Thanks for your feedback!