Google released Jetpack Compose 1.5 stable! It’s included in the 2023.08.00 BOM (Bill of Materials), which is available since yesterday. Meanwhile, Multiplatform Compose 1.5 is in beta (since two weeks) and offers a whole bunch of exciting improvements as well. In my opinion, version 1.5 is a huge step forward towards a mature multiplatform UI framework.
⚡ Jetpack Compose 1.5 stable
In the main Compose code, a lot of work has been done in optimising performance. Some quotes from Google’s announcement:
Modifiers see large performance improvements, up to 80% improvement to composition time, in this release.
We have taken a hard look at allocations happening across different Compose APIs and have reduced the total allocations in a number of areas, especially in the graphics stack and vector resource loading. This not only reduces the memory footprint of Compose, but also directly improves performance, as we spend less time allocating memory and reduce garbage collection.
BasicTexthas moved to a new rendering system backed by the modifier work, which has brought an average of gain of 22% to initial composition time and up to a 70% gain in one benchmark of complex layouts involving text.
The full announcement is linked below.
On the Kotlin Multiplatform side of Compose, many things are happening too! 1.5.0-beta01 includes the performance enhancements mentioned above, while adding enhancements for other platforms. I’ve listed some highlights below, but there’s a lot more in it.
🍎 Compose for iOS highlights
- native scroll and feel (the typical iOS rubber band feel)
- simplified multiplatform resource management
- San Francisco is now the default font
TextFieldfixes and improvements,
- Support for 120hz screens (was 60hz)
- Fixed: no longer need to set
isStatic = true, (an issue a lot of developers new to Compose on iOS run into)
🖥️ Compose for Desktop highlights
- Segoe UI is now the default font on Windows
- Improvements in Swing interop
🌐 Compose for Web highlights
Scrollbaris now commonly available (used to be desktop only)
- Custom canvas ID can be set on
Again, these are some highlights I found the most interesting. Especially the iOS updates bring Compose Multiplatform a lot closer to the native experience. There’s a lot more in each release and I recommend reading the release notes (linked below).
Compose 1.5 vastly improves the overall experience on Android, iOS, Desktop and Web. As more apps are being built with multiplatform Compose, it’s great to see the quality rising continuously. The best thing is that you’ll get these improvements almost for free, just by updating your dependencies 🚀. I’m looking forward to the next releases!
Go ahead and update now. And don’t forget to update your Gradle wrapper, too 😉
- Full anouncement: https://android-developers.googleblog.com/2023/08/whats-new-in-jetpack-compose-august-23-release.html
- Compose Multiplatform 1.5.0-beta01: https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.5.0-beta01
- Help JetBrains Improve the Performance of Your Compose Multiplatform Apps