codeprogression / Dagger2Recipes-ActivitiesMultibinding

Example app which shows how to build Activities Subcomponents Multibinding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Example app which shows how to build Activities Subcomponents Multibinding


Languages

Language:Java 100.0%