Repository navigation
Releases
Releases · google/dagger
Dagger 2.17
- 7eab363:
- Fixed a bug where parent components sometimes had bindings for child subcomponents if a parent module had a
@Binds @ChildScopemethod. - Fixed a bug where a
@Bindsmethod 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.androidand 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.DaggerFragmentin favor ofdagge 10BC8 r.android.support.DaggerFragmentto match Android P's deprecation of framework fragments. (a1bd0ea) - Scope annotations have no meaning on
@BindsOptionalOfmethods. Dagger now reports an error for them. Instead of applying a scope to the@BindsOptionalOfmethod, 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)
Dagger 2.16
- Deprecate
dagger.releasablereferences(928b157) @Modulecycles will no longer crash the processor. (cd70691)- Change SPI diagnostic reporting to calling methods on a
DiagnosticReporterinstead of returningValidationItems. (1f4f6bc) - Construct inlined multibindings more efficiently if a newer version of Guava is available (84ec3c6)
- Fix a bug where
@Bindsmethods with inaccessible map keys crashed the processor. (ebf0742) - Fixes
dagger-android-processorto handleandroidxtypes
Dagger 2.15
- 98b9c3f:
- Fix a bug where binding collisions were not properly checked across subcomponent boundaries when a parent provided a concrete
Set/Mapand a child provided a multibinding contribution with the same key. - Also applies to providing a concrete optional binding and
@BindsOptionalOfdeclarations.
- Fix a bug where binding collisions were not properly checked across subcomponent boundaries when a parent provided a concrete
- Fix a case where injecting a
Provider<GeneratedType>might not have properly delayed processing until that type was generated (57a43df) - Add Android proguard specs (b34edaf)
- Adds a
dagger.spipackage (in thecom.google.dagger:dagger-spiartifact) so users can hook into the Dagger binding graph at build time to report custom validation or generate extra files at build time. Note that this is still experimental and the APIs may change. (120a339) - Scopes are no longer allowed on
@Moduleelements. They never had a function and are now disallowed. (beeb29d) - Clarified
DaggerBroadcastReceiverdocumentation with respect to when injection is performed (a49cee0) - Fix some cases of the Kythe plugin (412c879)
- Fixed a bug with
@Provides/@Producesmethods in generic modules. (716dbcf) FluentFutureis now a supported return type of@ProductionComponentand@Producesmethods. (c98f88f)- Always parameterize
Optional.<Foo>absent/empty()to fix a javac7 issue (83459f2)
Dagger 2.14.1
- Fix a NoClassDefFound issue with
2.14(4a202b7)
Dagger 2.14
- Fix JPMS issue with javax.annotation types (b04e769)
- Remove dependency on JSR 305 annotations (02de197)
- Fixed a compilation issue with Eclipse (4e74fce)
- Adds a new error for component methods with type variables (71d0ad1)
- Improved compilation times (8ddc04e)
An issue (#994) was discovered with this release - please use dagger-2.14.1 instead.
Dagger 2.13
- Reductions in code size - code for repeated bindings is now placed in private methods instead of duplicating it throughout the component
dagger.androidspeed improvements:- Avoid calling Class.getCanonicalName(), which is slow on Android, during normal execution (c19f0c2)
dagger.grpc- update to gRPC 1.8 (19cc9f4)
Dagger 2.12
- The following kind of bindings are now inlined in the generated components and do not need a
Providerwrapper object (unless they are scoped or otherwise requested as a Provider).- Multibound
Sets andMaps- If you have Guava on your classpath, these will be implemented using
ImmutableSet/ImmutableMaptoo
- If you have Guava on your classpath, these will be implemented using
- Optional bindings
@Bindsbindings@BindsInstancebindings- Component dependencies
- Subcomponent Builders
- All members injection methods on a component
- Multibound
- Unused
Providerobjects are now removed from components, which should speed up initialization times! - In Dagger Producers, a provision binding that is used in a producers context will no longer be cached.
- Better support for running the dagger compiler with
javac9
Dagger 2.11
Mapmultibindings are no longer in beta.- New API:
@ContributesAndroidInjectorsimplifies the usage ofdagger.android - All
HasDispatching*Injectorsare renamed toHas*Injector. They also return anAndroidInjectorinstead of aDispatchingAndroidInjector - Added
DaggerApplicationandDaggerContentProvider auto-commonis properly shaded againdagger-android-processorworks better with Gradle if you're not usingdagger.android.support- First release of
dagger-grpc - Fixes for #421 and #671
dagger-gwtis now being released again@GwtIncompatibleis propagated to generated factories
Dagger 2.11-rc2
Dagger 2.11 - Release Candidate
Mapmultibindings are no longer in beta.- New API:
@ContributesAndroidInjectorsimplifies the usage ofdagger.android - All
HasDispatching*Injectorsare renamed toHas*Injector. They also return anAndroidInjectorinstead of aDispatchingAndroidInjector - Added
DaggerApplicationandDaggerContentProvider auto-commonis properly shaded again