Aug 22, 2017 · 1 min read
Great article! Thanks!
I’m still having a problem though, and it is preventing me to migrate dagger graph to Kotlin in the app I’m developing. The problem arise when I need to inject in a dagger module method a @Named parameter, in this case I’m not injecting it through a constructor or a field, I’ve tried all Kotlin annotation use-sites targets and none of them seems to work in a method parameter. Please any solution will be very much appreciated. Next you can find the portion of java code having the problem:
@Module
public final class MyModule {(...)@Provides
@Singleton
LoginStore provideLoginStore(@Named("main_dao_session") DaoSession mainDaoSession, @Named("demo_dao_session") DaoSession demoDaoSession) {
return new LoginStoreImpl(mainDaoSession, demoDaoSession);
}(...)}