LeoColman
07/22/2019, 3:12 PMPaulius Ruminas
07/23/2019, 6:24 AMgvetri
07/25/2019, 1:19 PMandroidContext(this@MainApplication)
in Java?. I actually have this
KoinApplication koinApp = KoinApplication.create()
.printLogger()
.modules(modules);
start(koinApp);
I’m actually using the 2.0.1 versionA Gamal
07/31/2019, 12:52 PMNir Golan
08/01/2019, 6:43 PMritesh
08/06/2019, 7:44 AMokHttpClient
as it's trying to override the second time. And not able to create 2 different instance.
Any help would be appreciated!!
@arnaud.giulianiLeoColman
08/06/2019, 8:46 PMRohil Chodankar
08/08/2019, 9:56 AMritesh
08/12/2019, 6:25 AMcheckModules()
in 2.x version. CheckModule fails, because it's not able to create context dependent dependency.
I have tried giving mockedContext using Mockito
and mocck
to startKoin
dsl, but no luck.igor.wojda
08/12/2019, 7:48 AMKoin
has some default callback in case when binding was not found? (equivalent of Kodein ExternalSource
https://kodein.org/Kodein-DI/?6.3/core#_external_source)Ove Stoerholt
08/16/2019, 7:38 AMclass Dummy
class MyTest : KoinTest {
@Test
fun `should inject my components`() {
startKoin {
modules(
module {
scope(named("dillA")) {
scoped { Dummy() }
}
})
}
val scope = getKoin().getOrCreateScope("dill", named("dillA"))
val scopeDummy = get<Dummy>()
assertThat(scopeDummy).isNotNull
}
}
Filip Zych
08/18/2019, 3:44 PMorg.koin.core.error.InstanceCreationException: Could not create instance for ... view model
and 3 other defined single<….>{} in the module. In Roboelectric in the @Before I start the Koin with android context and use loadKoinModules(module). I found some answers on stack overflow and I made sure everything is public but with no success.
In fragment I am using sharedViewModel if it changes anything.LeoColman
08/20/2019, 11:35 PMCody Engel
08/29/2019, 2:57 PM@Inject constructor(...)
in Koin? I’d like to avoid defining every dependency in modules/components but unsure if that’s possible.maddy
08/30/2019, 6:33 AMgvetri
09/03/2019, 1:52 PMFor each test, we start startKoin() and close Koin context closeKoin().But closeKoin() cannot be resolved. I saw in the source code the AutoCloseKoinTest and it use stopKoin instead is it a typo in the documentation? Or it’s an error from my part?
David Hackro
09/03/2019, 10:49 PMKoin
, and have the next questions.
What its the most recommended option for using Koin
in project with dynamic features?
for example, i have some modules (dynamic) and i need interaction between they, in big project is a problem with scalability
and maintainability
?
thanks for reading me 😬Henning B
09/04/2019, 8:39 AMKoinTest
interface
* create the mock
* create a Koin module with the mock inside
* at setup I start Koin
The output is as follows:
[DEBUG] [Koin] instances started in 0.024431 ms
[DEBUG] [Koin] +- get 'xyz.application.LocalizationHelper'
org.koin.core.error.NoBeanDefFoundException: No definition found for 'xyz.application.LocalizationHelper' has been found. Check your module definitions.
Am I doing something wrong or isn't it possible to inject mocks that way? If not, what would be the best practice to achive what I want via Koin?
Thanks a lot!arnaud.giuliani
09/11/2019, 2:50 PM2.1.0
, gathering all contributions and fixes.I squeeze 2.0.2 to run all on 2.1.0. Still looking if any urgent fix to add (if you seen one, you can ping here) 👍ritesh
09/20/2019, 11:57 AMretrofit
when i do checkModules
it throws up Method getMainLooper in android.os.Looper not mocked.
As my retrofit builder by default created with .io scheduler
, i tried adding trampoline, or removing it. Or custom rules for it to do it on the current thread. But no luck.
Wondering, if any one else had faced the same.emmanuelvinas
09/24/2019, 12:39 PMPiotr Prus
09/26/2019, 1:19 PMkvnxiao
09/26/2019, 5:26 PMgetAll
, and care not for the qualifier. Was hoping there was an easier way rather than defining a different qualifier each time as I have over 10 different classes in the listvoben
09/28/2019, 5:05 PM@Provides
fun provideRetrofit(client: Lazy<OkHttpClient>): Retrofit {
return Retrofit.Builder()
.callFactory(object : Call.Factory {
override fun newCall(request: Request): Call {
return client.get().newCall(request)
}
})
.build()
}
quver
10/09/2019, 12:35 PMimport static org.koin.java.standalone.KoinJavaComponent.inject;
but it’s import static org.koin.java.KoinJavaComponent.inject;
without standalone
Sam
10/11/2019, 11:58 AM<https://github.com/InsertKoinIO/koin/issues/471>
, but not work, so anyone have any solution for generic type ?
Thanks
LoginRepository extends BaseRepository
factory<BaseRepository> { LoginRepository(get()) }
abstract class BaseUseCase<R : BaseRepository> : KoinComponent {
private val _repository: BaseRepository by inject()
protected val repository: R
get() {
return _repository as R
}
}
Artem
10/11/2019, 1:52 PMValay
10/11/2019, 1:54 PMShreyansh Lodha
10/14/2019, 8:00 AM@Reusable
of Dagger 2
sajadgarshasbi
10/15/2019, 6:19 PM