rezenebe
10/12/2018, 10:21 PMval 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"tapchicoma
10/13/2018, 9:47 AMstartKoin()
call.dknapp
10/14/2018, 5:17 PMstartKoin()
. This isn’t in the koin documentation and should probably be added.rezenebe
10/14/2018, 7:59 PMstartKoin(this, listOf(appModule, remoteDatasourceModule),
extraProperties = mapOf(SERVER_URL to BuildConfig.BASE_URL))
}
This worked