With Koin annotations, is there any way to achieve the same functionality that Dagger has with @Binds and abstract funs to match Interfaces and Implementation classes?
I'm referring to doing this in Dagger:
Copy code
@Module
abstract class AppModuleBinds {
@Binds
abstract fun provideRandomClass(impl: RandomClassImpl): RandomClass
}
To achieve the same in Koin annotations I have to:
Copy code
@Module
@ComponentScan("...")
class AppModule {
@Factory
fun provideRandomClass(
dependency1: DependencyClass1,
dependency2: DependencyClass2,
): RandomClass = RandomClassImpl(dependency1, dependency2)
}
It gets a bit tedious when there are a lot of dependencies to inject.