AndroidX Lifecycle's Path To Multiplatform
summary
AndroidX Lifecycle becomes Kotlin Multiplatform compatible and reaches stable after a focused January–May 2024 effort that removes Android-only dependencies, enables Navigation Compose KMP, and fixes binary-compat breakages caused by Kotlin synthetic overloads. The work uses metalava and Kotlin binary-compat validator to detect removed constructors, adds a compatibility create() shim and a shared viewModelProviderImpl bridge with expect/actual platform hooks, replaces Java-only types, tests synchronization and dispatch fallbacks, and ships stable and working.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:08AndroidX support for KMP
- 3:18KMP compatibility vs support
- 5:09Timeline to stable release
- 10:09Moving ViewModelProvider to common
- 16:49Handling Java types in APIs
- 18:54Migrating ViewModelProvider with expect/actual
- 24:53Mixing expect/actual with common
- 25:56ViewModel addClosable and scope APIs
- 33:25Accessing native APIs in KMP
- 36:59Key takeaways
- 38:42Conclusion
related talks
29mAndroidX Lifecycle's Path to Multiplatform
41mApollo-Android: a Journey to Kotlin Multiplatform
33mGetting started with KMP
36mBest Practices for Developing Amazing Kotlin Multiplatform Apps
38mBuilding Android apps in 2022
40mKotlin Multiplatform. Make your Android App Cross-Platform
44mThe Future of Android, Kotlin, and Everything
25mKotlin Multiplatform Mobile in production: key takeaways from developing two cross-platform apps
