Hey I am trying to use Koin Annotation in a KMM pr...
# koin
y
Hey I am trying to use Koin Annotation in a KMM project , is that possible ?
a
y
well when adding these : dependencies { add("kspCommonMainMetadata",libs.ksp.compiler) add("kspAndroid",libs.ksp.compiler) add("kspIosX64",libs.ksp.compiler) add("kspIosSimulatorArm64",libs.ksp.compiler) } it just gives me this error :
so i ended up commenting the ios part and it worked dependencies { add("kspCommonMainMetadata",libs.ksp.compiler) add("kspAndroid",libs.ksp.compiler) // add("kspIosX64",libs.ksp.compiler) // add("kspIosSimulatorArm64",libs.ksp.compiler) }
a
ok 👌 interesting to see if a limitation from KSP
y
org.koin.core.error.NoBeanDefFoundException: No definition found for class:'com.immoceros.app.common.info.domain.InfoRepository' q:''. Check your definitions! i get this error , and I have no idea why this is the generated ksp code :
_fun_ KoinApplication.defaultModule() = modules(defaultModule)
_val_ defaultModule = module {
single(qualifier=
_null_) { com.immoceros.app.common.auth.data.remote.AuthClient() } bind(org.koin.core.component.KoinComponent::_class_)
single(qualifier=
_null_) { params -> com.immoceros.app.common.auth.data.repository.AuthRepositoryImpl(params.get()) } bind(com.immoceros.app.common.auth.domain.repository.AuthRepository::_class_)
single(qualifier=
_null_) { <http://com.immoceros.app.common.info|com.immoceros.app.common.info>.data.remote.InfoClient() } bind(org.koin.core.component.KoinComponent::_class_)
single(qualifier=
_null_) { params -> <http://com.immoceros.app.common.info|com.immoceros.app.common.info>.data.repository.InfoRepositoryImpl(params.get()) } bind(<http://com.immoceros.app.common.info|com.immoceros.app.common.info>.domain.InfoRepository::_class_)
}
a
did you use the
defaultModule()
in your modules?
y
yes i did but it does not want to import , its does not even exist
a
weird
y
ya I know, and I made sure that I had no problems, so I really don't know why I am getting this
Is there any information i can provide you with ?
a
I need to see gradle moduel structure, and where your Koin code is. Best is always a sample app project