Sharpening your Dagger 2 Skills
summary
Shows how to wire Dagger 2 for Android apps, use dagger-android to avoid manual component plumbing, and write deterministic tests by replacing modules with a test Application with swapped component or running each test in the orchestrator. Recommends constructor injection for plain unit tests, using @Binds over @Provides and static methods to shrink generated code, warns that heavy use of subcomponents produces generated components up to 150,000 lines and causes huge build and APK size and suggests keeping scopes coarse and modules focused.
AI-written summary · about
