toothpick
toothpick copied to clipboard
A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.
Hi! We notice that the random number generator (RNG) is used to produce test code in your project. For example, a random generator in the test method named ''concurrentScopeAdditionsAndRemovals_shouldNotCrash()'' in...
Suppose I am building a Web server. I tried to organize my scopes as such: AppScope -> SessionScope -> RequestScope -> MyScope How would I go about binding singleton instances...
For Kotlin projects, Toothpick currently makes use of KAPT. This is generally quite slow since it requires generating Java stubs before the annotation processing step. [KSP](https://github.com/google/ksp) offers an alternative to...
When executing `./gradlew check` on Windows in fails due to end-of-line characters. The issue is described here: #431 In this PR I propose to use `\n` to be platform-agnostic, as...
Hello, I was going to try to contribute but the **Unit Tests fail because of line separator**. **Unix** line separator is `\n` **Window** line separator is `\r\n` For instance `CyclicDependencyException`...
I dont use ViewModel, and want to handle lifecycle by TP. I have Activity and complex model with inner state(i can't save it in Bundle) - If I open scope...
Dagger is allowing to do smthg like this ``` interface IFooDi : IFoo, IFooUi @Binds @AppScope abstract fun fooDi(instance: Foo): IFooDi @Binds @AppScope abstract fun foo(instance: IFooDi): IFoo @Binds @AppScope...
Hello! Unfortunately, I got an unexpected crash with toothpick. How to reproduce the crash ``` val parentScope = KTP.openScope("App") val childScope = KTP.openScopes("App", "Child") childScope.installModules(module { bind(...) // here is...