hello guys, i’m having trouble with dagger2 and ko...
# android
n
hello guys, i’m having trouble with dagger2 and kotlin. I have declared a component : @Singleton @Component(modules = arrayOf(AppModule::class, ConfigModule::class)) interface AppConfigComponent { But to use fully the debug and release target on Android, i would like to have an intermediate class, Modules, that will contains the list of modules to use, as per follow : @Singleton @Component(modules = Modules.list) interface AppConfigComponent { but the problem here is : class Modules { * companion object {* * val list = arrayOf(AppModule::class, ConfigModule::class)* * }* } list is not a compile time constant. In kotlin, const requires primitive or String so i cannot use this keyword. Is there any solution ? Thank you very much