Releases: google/dagger
Releases · google/dagger
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
Dagger 2.10
- Release of
dagger.androidclasses to simplify injection of Android core types - By default, stop emitting "Prefer to run the dagger processor" warnings
- Allow component builders'
build()methods to return a supertype of the component - Generated components with
@BindInstancemethods in their builders no longer generate astaticcreate()method, since it would always be invalid.
Dagger 2.10-rc4
- Add
dagger.androidsupport forServices andBroadcastReceivers - Prevent scoping of
AndroidInjector.Factorys - Compiled code now has debug information (
javac -g) dagger.android.processorcan be used withoutdagger.android.supporton the classpath
Dagger 2.10-rc2
Fixes from 2.10-rc1:
- Move
AndroidInjection.inject()before invocationsuper.lifecycleMethod()Fixes #598 - Correctly publish
dagger-androidanddagger-android-supportwith anAndroidManifest.xml - Compile
daggeranddagger-producerswith-source 1.6 -target 1.6so they can be used in Android dagger-android-processorartifact added
Dagger 2.10-rc1
- Release of
dagger.androidclasses to simplify injection of Android core types - By default, stop emitting "Prefer to run the dagger processor" warnings
- Allow component builders' build() methods to return a supertype of the component
This is our first release using bazel instead of mvn. We don't believe there will be any noticeable differences, but if you see anything surprising please report an issue.
Dagger 2.9
- Faster compilation! With google-java-format 1.2, we have helped to fix a few performance bottlenecks which should result in less time in annotation proceessing for Dagger
- Added
@BindsInstancefor component builders to easily bind instances that are constructed outside of the graph - Producers: Added
ProducerMonitor.ready(), which is called when all of a producer's inputs are available - Removed
@Provides(type = ...)usage. Use the annotations indagger.multibindingsinstead.@Produces.typewas also removed - "Prefer to run the dagger processor" warnings are now off by default.
- New Validation
- All binding methods are now validated, even if they are unused in a particular
@Component @Component.dependenciescan no longer include@Modules.
- All binding methods are now validated, even if they are unused in a particular
Dagger 2.8
- Optimized generated
@Components! We now inline many calls to@Injectconstructors and@Providesmethods when we don't need aProvider<T>. - Some optimizations to the
dagger-compiler java.util.Optionalsupport for@BindOptionalOf- Releaseable References API for handling memory pressure for scoped bindings
- Our first release of the
dagger-androidartifact @Provides.Typeis officially deprecated - see their javadoc for the appropriate alternatives. As per our Versioning docs, these will be removed in ~6 months- Bug fixes with optional bindings in subcomponents
- Some generated factories are no longer implemented as
enums, reducing code size for Android users