InsertKoinIO / koin-annotations

Koin Annotations - About Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform insert-koin.io
https://insert-koin.io
Apache License 2.0
163 stars 44 forks source link

Fix compose import #172

Closed kibettheophilus closed 1 month ago

kibettheophilus commented 2 months ago

Hey @arnaudgiuliani , the import generated when KOIN_USE_COMPOSE_VIEWMODEL is active is org.koin.compose.viewmodel.dsl.viewModel which is unresolved and throws an error Unresolved reference 'viewmodel'.

.Also from the warning when the above argument is inactive says the import should be from org.koin.core.module.dsl.*

@Deprecated("Moved ViewModel DSL package. Remove old imports and use org.koin.core.module.dsl.*

Potential fix for #171

arnaudgiuliani commented 1 month ago

Thanks @kibettheophilus

arnaudgiuliani commented 1 month ago

this is the case in Koin 4.0. To merge in KA 2.0 branch