sample-anvil/README.md
The Anvil sample consists of 3 modules:
@ContributesViewModel to setup all of the wiring necessary for constructor dependency injection.The Anvil sample demonstrates how to setup a @ContributesViewModel annotation that allows you to do constructor injection from Dagger without any additional wiring such as the creation of a Dagger module. The setup requires a bit of infrastructure which is all included in these three modules. However, once it is set up, it dramatically simplifies the usage of ViewModels and Dagger.
A good starting point is ExampleFeatureFragment. ExampleFeatureFragment and the other classes in that folder demonstrate:
@ContributesViewModel to do constructor injection.@ContributesViewModel.