Hilt: Dependency Injection for the mere mortals
summary
Hilt provides a standard DI solution for Android by supplying lifecycle-aware dependency containers for Android classes and managing those lifecycles automatically. It is built on top of Dagger, leveraging Dagger’s compile-time checks, performance and tooling while hiding much of Dagger’s complexity.
AI-written summary · about
chapters (23)
- 0:00Start
- 4:29Construction logic vs business logic
- 4:57DI Recap
- 6:22What about Dagger?
- 7:06DI Solution Goals
- 8:30class MusicPlayer Inject constructor()
- 10:16class MusicPlayer Inject constructor private val db: MusicDatabase
- 10:50Module Installin(Application Component::elass) object DataModule
- 16:47class PlayViewModel View Model Inject constructor Assisted val savedStateHandle: SavedStateHandle val do: MusicDatabase
- 18:16Hilt Annotations
- 23:58Hilt Testing Annotations
- 24:20Testing tips
- 25:15Migration
- 27:05Hilt Anatomy
- 27:20Aggregation
- 30:48Hilt and Dagger?
- 34:00Component modules - | Preferences Module::class, Database Module::class
- 35:53Hilt benefits
- 36:58Creating your own hierarchy
- 37:21Android Entry Points Android EntryPoint
- 38:46What's next?
- 40:41Give us feedback!
- 41:45More resources!
related talks
32mUsing Hilt in a Multi-Module Project
45mDagger Hilt: Live Code Tutorial, Pros and Cons
25mFully Understanding Dagger Hilt Migration from First Principles
43mDI for Dummies
22mRex - From Dagger to Dagger Hilt
28mDependency Injection You Can Start Today
28mElevated Dependency Injection: Going Beyond the Basics with Custom Hilt Components
40mFundamentals of Dependency Injection
