Hi, I would like to know if it would be possible to use two DI frameworks in one android project, main app with dagger2 and one library with koin, and also would there be issues ? anyone has experience ? Thank you.
j
Javier
05/03/2021, 10:21 AM
library project should not be exposing Koin, so the app project should be doing nothing with Koin, if not, probably you have a wrong design
☝️ 1
🆗 1
m
Mohan Babu Malairaj
05/03/2021, 10:59 AM
It doesnt matter which DI framework the library used. You should be able to inject things based on the framework chosen for the app. Is that correct ?
j
Javier
05/03/2021, 11:02 AM
It is strange a library needs things of being injected by a framework
➕ 3
Javier
05/03/2021, 11:02 AM
Just pass the necessary things as parameters
Javier
05/03/2021, 11:03 AM
or use a builder pattern like a lot of libraries does