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

KOIN_USE_COMPOSE_VIEWMODEL does not work #150

Closed master-lzh closed 1 month ago

master-lzh commented 3 months ago

Describe the bug No matter where I add

ksp { 
    arg("KOIN_USE_COMPOSE_VIEWMODEL", "true")
}

, it still import org.koin.androidx.viewmodel.dsl.viewModel

Expected behavior import org.koin.compose.viewmodel.dsl.viewModel

Koin project used and used version (please complete the following information): koin-ksp-compiler 1.4.0-RC3

Additional moduleDefinition Add any other moduleDefinition about the problem here.

kibettheophilus commented 2 months ago

Hi @master-lzh , can you try removing the ksp argument? Seems it is deprecated as of version 1.4.*.

frogggias commented 2 months ago

@kibettheophilus The issue is in configuring the code writer for the default module. See fixed #157 .

kibettheophilus commented 2 months ago

@frogggias you are right, hadn't checked the imports well on the generated file.

arnaudgiuliani commented 1 month ago

yes, did you tried in RC4?