```val remoteDatasourceModule = module { singl...
# koin
r
Copy code
val remoteDatasourceModule = module {
    single { createOkHttpClient() }
    single { createWebService<ConfigDatasource>(get(), getProperty(DatasourceProperties.SERVER_URL)) }

    single { ConfigRepositoryImpl(get()) as ConfigRepository }
}

object DatasourceProperties {
    const val SERVER_URL = BuildConfig.BASE_URL
}
This seems to work just fine when I hardcode the SERVER_URL otherwise i get "Can't find property"
t
How you provided properties? Usually it should be done in
startKoin()
call.
d
The loadProperties value now defaults to false so you have to explicitly start it during
startKoin()
. This isn’t in the koin documentation and should probably be added.
r
Thanks @dknapp & @tapchicoma
Copy code
startKoin(this, listOf(appModule, remoteDatasourceModule),
                extraProperties = mapOf(SERVER_URL to BuildConfig.BASE_URL))
    }
This worked