Dagger Reflect - The circle from runtime to compile time and back to runtime
summary
Dagger Reflect replaces Dagger’s heavy generated component with a reflection runtime that swaps a 10,000‑line generated component for ~20 lines so local compilation skips expensive annotation processing; a Gradle plugin uses dependency substitution to flip compile/runtime coordinates. Tradeoffs: app startup increases (example 3s → 7s), runtime validation is lazy, error messages are weaker, and some Dagger features aren’t implemented yet. Requires annotation retention set to RUNTIME and minor build changes; real-world usage shows about 19% faster builds for opting‑in developers.
AI-written summary · about
chapters (15)
- 0:00Introduction and speaker background
- 1:04History of dependency injection
- 2:53The evolution of Dagger
- 4:36Introducing Dagger Reflect
- 6:43How Dagger Reflect works under the hood
- 12:02Project structure and setup
- 18:10How to use Dagger Reflect
- 22:09Dagger Reflect Gradle plugin
- 24:57Current state and limitations
- 26:00Future of Dagger Reflect
- 27:29Usage at SoundCloud
- 28:53Build time improvements and adoption
- 31:23Real-world build performance
- 33:55Trade-offs and developer experience
- 34:17Acknowledgments and closing
related talks
41mIt,s complicated, but it doesn,t have to be: a Dagger journey
39mYour Program as a Transpiler
15mUnderstanding Dagger 2's Codegen implementation
15mDagger Party Tricks
46mJava annotation processing magic for muggles
56mThe Wonders of Java Annotation Processing at Compile Time
50mRevealing the magic behind Java annotations
50mHow Not to Grow Old During Compilation: Kapt and Other Adventures
