Shahid Iqbal4213
10/18/2025, 5:31 PMinternal val authApiModule = module {
single<Retrofit>(named(AUTH_RETROFIT_QUALIFIER)) {
Retrofit.Builder()
.baseUrl("<https://api.example.com/>") // Base URL must be set here
.addConverterFactory(GsonConverterFactory.create())
.client(get<OkHttpClient>(qualifier = named(OKHTTP_CLIENT_QUALIFIER)))
.build()
}
factory<AuthApi> {
provideApi(
get<Retrofit>(qualifier = named(AUTH_RETROFIT_QUALIFIER)),
AuthApi::class.java
)
}
}
and AuthApi module is added to main module
val authFeatureModule = module {
includes(authNavModule, authApiModule, authMainModule)
}arnaud.giuliani
10/22/2025, 9:50 AM