Dagger2 v2.19 Release Notes

Release Date: 2018-10-29 // over 5 years ago
    • dagger.android has a new format for binding AndroidInjector.Factorys:
      • Instead of returning AndroidInjector.Factory<? extends Activity> (or Service, Fragment, etc), return just AndroidInjector.Factory>
      • Instead of using @ActivityKey (or @ServiceKey, @FragmentKey, etc), use @ClassKey. The dagger.android map keys (with the exception of @AndroidInjectionKey are now deprecated
      • If you use @ContributesAndroidInjector, there's nothing to do. We have updated the output to match the new format
      • We have provided an ErrorProne refactoring for migrating to the new format of binding AndroidInjector.Factorys with dagger.android. See these docs for how to apply the refactoring to your codebase if you're on dagger-compiler-2.19. (02dc4a7)
      • In the next release (2.20), we will remove the old format. This will allow us to support AndroidX packages better.
      • For the complete docs, visit https://google.github.io/dagger/android
    • Avoid some thrown errors during Dagger compilation for invalid modules. (4df5adf)
    • 🛠 Some formatting fixes even when the formatter is turned off