A simple Dagger 2 tutorial, with instructions in the commit messages. The commits will build up from a template, to full functionality without dependency injection, eventually using Dagger 2 in the end.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
gradle/wrapper
pretend3rdpartylib
.gitignore
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

dagger2-gradle-quickstart

A simple Dagger 2 tutorial, with instructions in the commit messages. The commits will build up from a template, to full functionality without dependency injection, eventually using Dagger 2 in the end.

Issues, pull requests, and forks are encouraged.

Learning Resources

I find the explanations here to be very helpful: http://fernandocejas.com/2015/04/11/tasting-dagger-2-on-android/

FAQ

Where is DaggerApplicationComponent? Your sample doesn't have it and I cannot even build your sample project!

  • Please wait for the project to build, or build it manually. Dagger 2 uses code generation to do its DI black magic.