Describe the bug
I'm unsure how to use Koin Annotations with expect/actual classes as it seems to not work no matter how I set it up. The documentation shows that you should annotation to the actual class. On the other hand, the Hello Koin KMP sample app does it different and adds the annotaiton to the expect class.
However, no matter whether I add the annotation to the expect class, to the actual class, or to both expect and actual class, Koin will throw a NoDefinitionFoundException. The ksp generated Module file will not contain the annotated class.
Note that if I define the actual class via code, it works fine, so this isn't an issue that is blocking my development.
To Reproduce
Steps to reproduce the behavior:
Setup koin.
Create an expect/actual class.
Add @Single or @Factory annotation to the actual class.
Run app and attempt to inject said class.
Expected behavior
The class will be injected properly and app will run smoothly.
Actual behavior
The app will crash and throw NoDefinitionFoundException.
Koin module and version:koin-annotations:2.0.0-Beta1
Describe the bug I'm unsure how to use Koin Annotations with expect/actual classes as it seems to not work no matter how I set it up. The documentation shows that you should annotation to the actual class. On the other hand, the Hello Koin KMP sample app does it different and adds the annotaiton to the expect class. However, no matter whether I add the annotation to the expect class, to the actual class, or to both expect and actual class, Koin will throw a
NoDefinitionFoundException
. The ksp generated Module file will not contain the annotated class.Note that if I define the actual class via code, it works fine, so this isn't an issue that is blocking my development.
To Reproduce Steps to reproduce the behavior:
@Single
or@Factory
annotation to the actual class.Expected behavior The class will be injected properly and app will run smoothly.
Actual behavior The app will crash and throw
NoDefinitionFoundException
.Koin module and version:
koin-annotations:2.0.0-Beta1