Yann Badoual
11/22/2018, 9:22 AM@Module
abstract Bar {
@Module
companion object {
@Provides @Named("foo") @JvmStatic
fun providesFoo(): Foo { ... }
}
}
When trying to inject Foo
in a field (with @field:Named("foo")
), it’s not working,
I have to create another class and put the providesFoo
method outside the companion (working fine in an object
class)