finds.dev← search

// the find

mitchtabian/Dagger-Examples

★ 273 · Java · updated Jan 2020

Some dagger-android examples with Retrofit2, MVVM architecture, RxJava, (Java)

A companion repo for codingwithmitch's paid Dagger2-on-Android course, showing dagger-android setup (DaggerApplication, DaggerAppCompatActivity, DaggerFragment, @ContributesAndroidInjector) wired into an MVVM app with Retrofit2 and the Jetpack Navigation component. It's for Android devs trying to get past Dagger2's boilerplate and scoping rules by seeing a full example app rather than fragments of code.

Covers the parts of dagger-android that trip people up in isolation - activity/fragment injection, custom scopes (AuthScope, MainScope), subcomponents via @ContributesAndroidInjector, and multibinding for ViewModelFactory - all in one buildable app instead of scattered snippets. The module structure (ActivityBuildersModule, ViewModelFactoryModule, per-feature *ViewModelsModule) is a reasonable template to copy for a real dagger-android setup.

Dead since January 2020 - no Hilt, no Kotlin, no coroutines, and dagger-android itself is now semi-deprecated in favor of Hilt, so a newcomer following this is learning a pattern Google has since moved away from. It's a loss-leader for a paid course, not a maintained reference: no tests beyond the generated boilerplate, no CI, and the README is just a sales page with zero setup or architecture notes in-repo. Java-only, which is a real drawback for anyone learning Android DI in 2026 when Kotlin is the default.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →