Hi all, I have a problem compiling my app, I have ...
# koin
a
Hi all, I have a problem compiling my app, I have a multiplatform app with multiple gradle modules, also using koin with annotations. My problem is that in several modules I use compose view model, and the annotation @KoinViewModel, and specifically for those modules I get an error
Explain build error: Type org.koin.ksp.generated. KoinDefAndroidxLifecycleViewModel$ $ ExternalSynthetic$ Condy0 is defined multiple times
That does not happen if I define modules containing viewmodels using dsl, and other modules which don't use @KoinViewModel but other annotations, works perfectly fine.
So I found a problem, but maybe it can be fixed in the library
I have two modules packageA and packageB
both modules have the org.koin.ksp.generated package
every other dependency has the public class KoinDef<packageName>Dependecy
except KoinDefAndroidxLifecycleViewModel
it's the same for both modules
thus when building the app the mergeLibDexDebug complains on duplicatie classes which originate from the both modules?
can it be fixed by generating KoinDef<packageName>AndroidxLifecycleViewModel ?
@arnaud.giuliani?
It's about the KoinMeta class
a
ok, it's in 1.4-RC4 ?
a
Yes
a
seems that it's keeps regenerate KoinDef<packageName>AndroidxLifecycleViewModel right?
a
So KoinDefAndroixLifecycleViewModel lacks the package name when generated in two diferent modules, and since all modules generate under the same package name, I get a duplicate class. All other KoinDefs contain the package name. I also updated the issue description since the triangular brackets got escaped and it was not clear what i ment.
Also the packages are two different gradle modules, if that matters.
a
Ok, got it 👌
👍 1