Guyaume Tremblay
05/09/2025, 2:45 PMcommonMain
to androidMain
!
In fact, there is still a defaultModule
in the commonMain
with 2 @Factory
. All of my @Single
is now in my custom Module in build/generated/ksp/android/androidDebug/kotlin/org.koin.ksp.generated
.
I tried koin-annotations 2.0.1-RC1 seeing this PR : Fix - Fix all kmp generation from commonMain to native side by @arnaudgiuliani in #258
but still the same.
This project doesn't have any module, singleton or factory on the platform side.
Do you have any idea of what is happening?arnaud.giuliani
05/09/2025, 3:51 PMarnaud.giuliani
05/09/2025, 3:52 PMarnaud.giuliani
05/09/2025, 3:52 PMGuyaume Tremblay
05/09/2025, 5:36 PMcommon/di/Modules.kt
, there is for example, the ViewModelModule
, with ComponentScan
. That's exactly like mine. The only difference, is that this one is included in the AppModule
and this is this last one which is used in the startKoin
. If I do the same, the AppModule is also generated in build/generated/ksp/android/androidDebug/kotlin/org.koin.ksp.generated
.
> did you took a look at gs example
Not recently, as this project is running in production with Koin 3.5Guyaume Tremblay
05/09/2025, 8:43 PMadd("kspCommonMainMetadata", libs.koin.ksp.compiler)
my custom modules are not generated. I only get a default module containing only my factory, no singleton.
As soon as I add
add("kspAndroid", libs.koin.ksp.compiler)
My custom modules appear but under the wrong generated folder. But my @Factory
are still under a default module. That's weird because both are under the same package, which is the one defined in the @ComponentScan
Guyaume Tremblay
05/12/2025, 1:41 PMarnaud.giuliani
05/12/2025, 4:57 PMarnaud.giuliani
05/12/2025, 4:57 PMGuyaume Tremblay
05/12/2025, 5:22 PMarnaud.giuliani
05/12/2025, 5:25 PMGuyaume Tremblay
05/12/2025, 5:25 PMGuyaume Tremblay
05/12/2025, 5:25 PMarnaud.giuliani
05/12/2025, 5:27 PMGuyaume Tremblay
05/12/2025, 7:02 PMarnaud.giuliani
05/13/2025, 7:09 AMGuyaume Tremblay
05/13/2025, 12:01 PM