https://kotlinlang.org logo
#compose
Title
# compose
e

eygraber

03/13/2024, 4:53 AM
Looks like someone is working on porting compose lifecycle to KMP!
K 1
🆒 1
Is the plan for androidx to supply the Android implementation, and if you need it for other platforms you'd fill it in with
LocalLifecycleOwner
?
j

jw

03/13/2024, 5:10 AM
JetBrains already did this in their fork
This is just the logical upstreaming/redoing of their change in AOSP
You'd have to ask JetBrains what their plans are for Compose UI. I don't really care about Compose UI.
The more interesting change is inverting the lifecycle Compose dependency on Compose UI https://android-review.googlesource.com/c/platform/frameworks/support/+/2989145
i

Ian Lake

03/13/2024, 5:13 AM
Yep, Jetbrains already wrote the LifecycleOwner for iOS: https://androiddev.social/@ianlake/111977066041544601
j

jw

03/13/2024, 5:14 AM
By fixing the dependency structure, lifecycle becomes usable outside of Compose UI in any Compose-based library. Making it multiplatform then makes it work on any Composition on any platform.
❤️ 6
e

eygraber

03/13/2024, 5:20 AM
Looks like JetBrains is also adding an implementation for web. Exciting times!
kodee happy 4
j

Joel Denke

03/13/2024, 7:27 AM
Out of curiosity, is there any discussions or YouTrack things follow Jetbrains and/or Googles commitment of other things around lifecycle or other androidx or jetbrains compose things that has plans? I know jetbrains mentioned multiplatform navigation as of example. But not much more than that.
i

Ivan Matkov

03/13/2024, 7:55 AM
> porting compose lifecycle to KMP I've already did it before, but it was reverted due to unrelated gradle bug 🙁 Hope the change in different module won't trigger such issues > and if you need it for other platforms you'd fill it in with
LocalLifecycleOwner
? Compose multiplatform will be lifecycle owner itself and provide it by default. > By fixing the dependency structure, lifecycle becomes usable outside of Compose UI in any Compose-based library. Please note this change will work correctly only with Compose UI 1.7. The next version of Compose Multiplatform will be 1.6.10 (need to release before stable 1.7 from Google), it will contain this composition local in "old" place > Looks like JetBrains is also adding an implementation for web Yep, but it won't be upstreamed due to lack of build infrastructure limitation to AOSP yet, we'll re-publish it from JetBrains with redirection to Google artifacts when trey available (like we already do with Compose). We're currently working to adjust our build scripts to new modules, I hope first dev version will be soon > is there any discussions or YouTrack ViewModel - https://partnerissuetracker.corp.google.com/issues/214568825 Navigation is mentioned in the Compose Multiplatform plan (there was a blogpost) Currently we use GitHub as a public issue tracker for Compose Multiplatform (subject to change at some point), so you can follow to specific threads about module that you're interested on. As far as I remember, there is no meta-issue for such porting for now
thank you color 4
🎉 4
3 Views