Example app which shows how to build Activities Subcomponents Multibinding
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Fix UI test Dec 19, 2016
gradle/wrapper init commit Oct 18, 2016
.gitignore init commit Oct 18, 2016
README.md Update README.md Oct 18, 2016
build.gradle updated dependencies Nov 20, 2016
gradle.properties init commit Oct 18, 2016
gradlew init commit Oct 18, 2016
gradlew.bat init commit Oct 18, 2016
settings.gradle init commit Oct 18, 2016

README.md

Dagger2Recipes-ActivitiesMultibinding

Example app which shows how to build Activities Subcomponents Multibinding


Starting from Dagger 2.7 there is a new way of declaring Subcomponents (my @Module.subcomponents). Thanks to this we are able to decouple AppComponent from Activities Subcomponents.

Using Multibinding we can inject Activity Subcomponents builders without passign instance of AppComponent to Activities what means that finally we can test Activities decoupled from the whole Application. We are able to provide mock objects to our activity without using tools like DaggerMock.

Check blog post: Activities Multibinding in Dagger 2 for more details.