deliveryhero/whetstone
Whetstone is a dependency injection framework for Android that greatly simplifies working with Dagger 2 using all the powers of Anvil
What's novel
Whetstone is a dependency injection framework for Android that greatly simplifies working with Dagger 2 using all the powers of Anvil
Code Analysis
31 files read · 7 roundsA Kotlin/Android DI framework that simplifies Dagger+Anvil setup by providing standard component scopes (Application, Activity, Fragment, ViewModel, Service, View), a meta-annotation system for extensible code generation, and a Gradle plugin that orchestrates Anvil compiler plugin to generate all Da
Strengths
The meta-annotation system (@AutoInjectorBinding/@AutoInstanceBinding) is an elegant, extensible design that lets users create custom scope annotations with zero compiler changes. The architecture cleanly separates concerns: runtime library, compiler plugin, Gradle plugin, and optional integrations (Compose, WorkManager) are all well-isolated modules.
Weaknesses
Test coverage is thin — only 3 test files in the core module and the codegen tests likely only verify generated code structure rather than runtime behavior. The activity component caching uses a non-thread-safe HashMap, and the LazyClassKey workaround (generating a helper object) is a code smell indicating incomplete Anvil support that could break with Anvil upgrades.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
63
Contributors
11
Files
149
Active weeks
13
Repository
Language
Kotlin
Stars
218
Forks
7
License
Apache-2.0