Closed IsakTheHacker closed 5 months ago
I just posted a response about general KMP support in https://github.com/google/dagger/issues/3916#issuecomment-2096570308. In this case though, are you asking about something specific to the @HiltViewModel
annotation (like just asking for that specific annotation to move to common without us providing other platform support) or just about general KMP support?
Facing this bug here: https://github.com/google/dagger/issues/4320
The team responsible for making AndroidX Lifecycle is currently making great progress on converting the library to Kotlin Multiplatform and I think we are expecting a release soon as the new version (2.8.0) is currently in beta. This update will allow us to put ViewModels in common source sets so I see a lot of value in making Hilt and the @HiltViewModel annotation compatible with KMP. I don't have the skills needed to know if this would require a major rework or not though so please tell me if this is out of scope for now.
Thank you beforehand and thanks for making one of the best dependency injection frameworks for Android!