Hey guys, I was wondering, do we have support for ...
# koin-contributors
l
Hey guys, I was wondering, do we have support for child modules? e.g. I have shared-di module that wants to do component scan over any module (for example
feature:account:data-keyvalue
) and child module in the parent directory based on package name.
a
Hey Lukáš, you already have glob expression for @ComponentScan scanning. You can then scan for the given package and subfolders.
l
Well, in that case it's not working. Since either I've misconfigured something or it's because of KSP2.
@arnaud.giuliani created a small project https://github.com/LukasAnda/Koin-Cross-module-annotations. If you try to do assemble, the AppModule generated is empty and should contain a class from the feature module
And I found the issue perhaps, it's because the ksp finds the cross-module dependencies in different passes which breaks the processing for KMP but still works for single-target dependencies
a
could be interested to reproduce it in a local sample 🤔
Also, I'm publishing @Configuration and @KoinApplication new annotations to help scan automatically for modules https://insert-koin.io/docs/reference/koin-annotations/modules
K 1
l
It's already a reported issue, it seems like we have to wait for ksp2 to be updated unless you can make a different solution
a
KSP2 is active bde fault in KSP 2.1.21-2.0.2
l
Yes it is but there is this issue which is related to Koin https://github.com/google/ksp/issues/2396 which has yet to be fixed