I'm in a multi-module, multi-platform project, migrating to Koin using Koin Annotations. The issue I run into is that the DefaultModule is generated next to each module's generated implementation, and that default one is always
org.koin.ksp.generated.defaultModule
, causing collisions. How can I disable the default module generation and only use my own ones (with
@ComponentScan
)?
Error: Type org.koin.ksp.generated.DefaultKt$defaultModule$1$1 is defined multiple times
Jacob Ras
08/22/2023, 2:54 PM
🦆 Classic rubber duck! I looked into the generated code already but now I finally noticed that the generated stuff is not the same! The default module was adding generated code that my modules was missing.
Long investigation short: I had my
Module
class in a sub-package, and it only scans downwards (into deeper packages). I moved it one package up (in the root of my gradle module) and now it's putting all dependencies in the generated module and the