Christoph Wiesner
12/14/2022, 7:12 AM@Provides
fun provideManager(config, managerImplA, managerImplB): Manager {
return if (config.shouldUseA) {
managerImplA
} else {
managerImplB
}
}
doing this means i have to instantiate both implementation but only one gets used in the end.
problem is that all the dependencies of the implementation also will get wired up and kick off some processes that i do not want to be instantiated if that version is not gonna be used.
is there a way to achieve this without having the instances already?FunkyMuse
12/14/2022, 8:05 AMChristoph Wiesner
12/15/2022, 3:24 PMDave Scheck
02/14/2023, 9:35 PM