Skip to content

Releases

Dagger 2.10

Choose a tag to compare

@ronshapiro ronshapiro released this 20 Mar 17:47
  • Release of dagger.android classes 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 @BindInstance methods in their builders no longer generate a static create() method, since it would always be invalid.

Dagger 2.10-rc4

Choose a tag to compare

@ronshapiro ronshapiro released this 13 Mar 16:59
  • Add dagger.android support for Services and BroadcastReceivers
  • Prevent scoping of AndroidInjector.Factorys
  • Compiled code now has debug information (javac -g)
  • dagger.android.processor can be used without dagger.android.support on the classpath

Dagger 2.10-rc2

Choose a tag to compare

@ronshapiro ronshapiro released this 03 Mar 16:40

Fixes from 2.10-rc1:

  • Move AndroidInjection.inject() before invocation super.lifecycleMethod() Fixes #598
  • Correctly publish dagger-android and dagger-android-support with an AndroidManifest.xml
  • Compile dagger and dagger-producers with -source 1.6 -target 1.6 so they can be used in Android
  • dagger-android-processor artifact added

Dagger 2.10-rc1

Choose a tag to compare

@ronshapiro ronshapiro released this 21 Feb 21:31
  • Release of dagger.android classes 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

Choose a tag to compare

@ronshapiro ronshapiro released this 03 Feb 19:03
  • 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 @BindsInstance for 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 in dagger.multibindings instead. @Produces.type was 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.dependencies can no longer include @Modules.

Dagger 2.8

Choose a tag to compare

@ronshapiro ronshapiro released this 22 Nov 15:48
  • Optimized generated @Components! We now inline many calls to @Inject constructors and @Provides methods when we don't need a Provider<T>.
  • Some optimizations to the dagger-compiler
  • java.util.Optional support for @BindOptionalOf
  • Releaseable References API for handling memory pressure for scoped bindings
  • Our first release of the dagger-android artifact
  • @Provides.Type is 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

Dagger 2.7

Choose a tag to compare

@ronshapiro ronshapiro released this 13 Sep 15:11

Dagger 2.6.1

Choose a tag to compare

@ronshapiro ronshapiro released this 24 Aug 15:21

A few bugfixes

  • Create bindings for @Binds methods even when the RHS cannot be resolved
    • Note: this may result in new duplicate or missing binding errors that were not previously detect.
  • Change ProducerToken to use Class#getCanonicalName instead of Class#toString to avoid extra string allocations.

Dagger 2.6

Choose a tag to compare

@ronshapiro ronshapiro released this 27 Jul 14:18
  • @Provides methods are now allowed in @ProducerModules
  • New and better multibindings errors
  • Provider<Lazy<T>> can now be used to break dependency cycles.
  • Fixes bug where @Binds methods sometimes didn't contribute to multibindings in subcomponents
  • Fixes bug where generated factories had conflicting parameter names

Dagger 2.5

Choose a tag to compare

@ronshapiro ronshapiro released this 15 Jun 19:45
  • Enables @Binds usage with multibinding annotations (@IntoSet, @ElementsIntoSet, and @IntoMap)
  • Adds @Multibinds API to replace @Multibindings interfaces
  • @Component.Builder methods for abstract modules are no longer allowed
  • Performance improvements for @IntoSet usage. Provided objects are no longer wrapped in a wasteful Collections.singleton()
  • Compilation speed improvements for large graphs
  • @Scopes are no longer allowed on @Produces methods
  • Adds state checking to scoped providers to make sure a circular dependency does not create multiple instances
  • Producers optimizations: Each @Produces method now generates 1 class instead of 2
  • Fix: Requests for Map<K, V> now include both @Provides @IntoMap and @Produces @IntoMap values