hi all, how we can use DI in KMM. I mean automati...
# multiplatform
k
hi all, how we can use DI in KMM. I mean automatic DI for ApiServices, UseCases etc ? and ideas ?
b
#kodein #koin
You can't use annotation based di on kmp, though
k
I create simple class represent as a Wrapper of all my usecases and apiServices and it’s support lazy block. But I think in automatic register instances by using reflection ? can I do it ?
for example I put all my Account UseCases on Specific Package /src/commonMain/com/app/domain/usecases/account/ and by reflection Read All Classes and check if this class implements AccountUseCase imitate this object and push it to my Wrapper Class
b
No reflection on kotlin native, so no
k
oops : ) oky, I will try in other way
thanks @Big Chungus