Dagger 2.17
ronshapiro
released this
07 Aug 17:12
·
2108 commits
to master
since this release
- 7eab363:
- Fixed a bug where parent components sometimes had bindings for child subcomponents if a parent module had a
@Binds @ChildScope
method. - Fixed a bug where a
@Binds
method in a parent but used only from a child, whose dependency is missing in the parent but present in the child, used to result in a valid graph. Now an error is correctly added. - If you start seeing missing binding errors in this release, check out this wiki page for information on how to debug the issues.
- Fixed a bug where parent components sometimes had bindings for child subcomponents if a parent module had a
- Fix bug when reporting cycles if some components have no entry points that depend on the cycle. (c55bec3)
- 3a08964:
- If you use
dagger.android
and you aren't already installingAndroidInjectionModule
(orAndroidSupportInjectionModule
), you should do so, otherwise you are likely to get a missing binding error from Dagger when you upgrade. - Adds an option to use string keys for dagger.android and allow the keys to be obfuscated.
- Note that if you use a bytecode shrinker/optimizer, this is only viable if you use a version of R8 that can read generated proguard rules (or if you extract the contents of the generated rule and include it in your build)
- You can enable this mode with the flag
-Adagger.android.experimentalUseStringKeys
.
- If you use
- If two entry point methods with different keys are inherited from different supertypes of a component type, Dagger will now report an error. (51d049f)
- Renamed experimentalAndroidMode to fastInit. See https://google.github.io/dagger/compiler-options (d55c02d)
- Deprecated
dagger.android.DaggerFragment
in favor ofdagger.android.support.DaggerFragment
to match Android P's deprecation of framework fragments. (a1bd0ea) - Scope annotations have no meaning on
@BindsOptionalOf
methods. Dagger now reports an error for them. Instead of applying a scope to the@BindsOptionalOf
method, apply it to the non-optional binding that satisfies the optional binding. (8852d0b) - Report an error for binding methods that have more than one scope annotation, instead of throwing an exception. (192d359)
- Fixes a bug where scope annotations in error messages were missing annotation attributes (fc09c71)