Dagger2 v2.20 Release Notes

Release Date: 2018-12-20 // over 5 years ago
    • Peformance improvements in annotation processing (8012ab5)
    • Report duplicate bindings only once, not once per request. (623461f)
    • ๐Ÿ‘‰ Make sure all processing steps defer elements properly if they have missing types. (3b0fcc8)
    • ๐Ÿ‘‰ Make @ProductionComponent have runtime retention so tools can interpret it like all of the other component annotations (fff65e3)
    • 325b516:
      • Add module-level validation. When -Adagger.moduleBindingValidation=ERROR or =WARNING is set, then each module is processed as a kind of component (without generating any code) in order to validate the bindings installed by it and all included modules. Any binding graph errors, such as duplicate bindngs (but not including missing bindings), will be reported as errors or warnings depending on the option.
    • Report map multibinding contribution errors once regardless of whether the map is requested as Map<K, V>, Map<K, Provider<V>>, or Map<K, Producer<V>>. (350368e)
    • c7e7c4f:
      • Fixes two bugs related to @ProductionScope bindings:
      • Where modules with @ProductionScope bindings are installed in multiple components in the same component ancestry, the binding is now resolved only once and only in the rootmost component.
      • When @Inject bindings with @ProductionScope are referenced in a binding graph, the binding is now resolved in the rootmost @ProductionScope component.
    • 221f000:
      • dagger.android code can no longer use the AndroidInjector.Factory<? extends Activity> format to bind injector factories. See https://google.github.io/dagger/android and the 2.19 release notes for information on how to migrate.
      • Adds an ErrorProne refactoring for migrating from AndroidSupportInjectionModule (which now is functionless) to AndroidInjectionModule. See these docs for how to apply the refactoring to your codebase if you're on dagger-compiler-2.20.
    • โœ‚ Removed dagger.releaseablereferences (a72c342)
    • โœ‚ Removed the -Adagger.floatingBindsMethods flag added in 2.17 (https://github.com/google/dagger/wiki/Dagger-2.17-@Binds-bugs) (bc8dd5b)