Fixed
Status Update
Comments
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add jvmStubs
and linuxX64Stubs
targets to lifecycle-viewmodel-compose
Expand for full commit details
Add `jvmStubs` and `linuxX64Stubs` targets to `lifecycle-viewmodel-compose`
- `androidx.lifecycle:lifecycle-viewmodel-compose` was migrated to KMP before `androidx.compose` introduced the stub targets.
- Moving from `desktop` to the new stub targets allows other AndroidX libraries using `androidx.lifecycle:lifecycle-viewmodel-compose` to support the same targets as `androidx.compose`.
- Since `jvmStubs` and `linuxX64Stubs` were introduced in Compose version 1.7.1, we need to update the dependency version from 1.6 to the latest stable version. See Compose Runtime 1.7.1 release notes for details: https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.7.1
- With the addition of other targets (Android, Desktop), we need to explicitly import `Jvm*` annotations in the common source set.
- As we now have native targets, we need to track our public ABI.
RelNote: "Lifecycle ViewModel Compose now depends on Compose 1.7.8."
RelNote: "No changes to Android artifacts. `-desktop` artifacts were removed and `-jvmStubs` and `-linuxx64Stubs` artifacts were added. None of these targets are meant to be used, they are placeholders to help Jetbrains Compose efforts."
Bug: 406592090
Test: N/A
Change-Id: I5cb14cb1dc5bc462961763252b2b3726f85145cb
Files:
- A
lifecycle/lifecycle-viewmodel-compose/bcv/native/current.txt
- M
lifecycle/lifecycle-viewmodel-compose/build.gradle
- M
lifecycle/lifecycle-viewmodel-compose/src/commonMain/kotlin/androidx/lifecycle/viewmodel/compose/ViewModel.kt
- M
lifecycle/lifecycle-viewmodel-compose/src/nonAndroidMain/kotlin/androidx/lifecycle/viewmodel/compose/LocalViewModelStoreOwner.nonAndroid.kt
Hash: fb2b226eeb1239c7a6029ff4c24bc4b1e66561ea
Date: Thu Mar 27 14:31:53 2025
Description
It would be nice if we could add `jvmStubs()` and `linuxX64Stubs()` to the list.