Skip to content

Releases: google/dagger

Dagger 2.25.4

27 Dec 18:24
Compare
Choose a tag to compare

What's new

Bug fixes

Dagger 2.25.3

16 Dec 23:33
Compare
Choose a tag to compare

What's new

  1. Bug fixes

    1. Fix #1659: Add workaround for missing Kotlin qualifiers annotations across compilation units. (c96fc3e)
    2. Fix #1648: Kotlin object module providers of a primitive type would fail to compile (d0dfab8)
    3. Fix #1645: Improve memory footprint when parsing Kotlin metadata by using the visitor APIs. (f4f6d18)
  2. Maintenance

    1. Bump Android API to 29 and build tools to 29.02. Also bazel 1.1.0. (5e7374e)
    2. Add gradle build test to the release script to test maven artifacts build. (e80e4b1)

Dagger 2.25.2

23 Oct 21:06
Compare
Choose a tag to compare

Known breaking changes

  • The Kotlin change in 2.ii (below) will break users who were passing in object module
    instances into a Component builder method rather than using @JvmStatic.
    To fix this issue, remove the call to the builder method -- the module instance is
    no longer needed and the Component builder method will no longer be generated.

What's new

  1. Bug fixes

    1. Fix duplicate missing binding error messages. (2411074)
    2. Fix dagger-spi pom file from dependency cycle. (3699697)
    3. Fix issue with missing shaded deps from release 2.25 (efe1b00)
  2. Kotlin support

    1. Qualifier annotations on fields can now be understood without
      The need for @field:MyQualifier (646e033)
    2. @Module object classes no longer need @JvmStatic on the
      provides methods. (0da2180)
  3. Performance Improvements

    1. Build performance:
    2. Runtime performance:
      • _Factory proxy methods can now be accessed without
        class loading the factory (a258d37).

Dagger 2.25

22 Oct 20:32
Compare
Choose a tag to compare

Do not depend on this release.

Depend on release 2.25.2 instead, which fixes issue #1639.

Dagger 2.24

25 Jul 23:39
Compare
Choose a tag to compare
  • Deprecations/removals
    • dagger.android's Has{Activity,Fragment,Service,ContentProvider,BroadcastReceiver} interfaces are now removed in favor of HasAndroidInjector (which can handle any type). HasAndroidInjector was added in 2.23, and is supported together with the old types in that version. (3bd8f70)
  • Bug fixes
    • Duplicate keys were erroneously not detected when MapKey.unwrapValue=false which may have resulted in a runtime error (depending on whether fastInit mode was used). This is now detected and failed at compile time. (8b5dbea)
  • Build performance
    • Gradle's incremental annotation processing is now enabled for all builds (50bc180)

Dagger 2.23.2

19 Jun 14:33
Compare
Choose a tag to compare

In addition to the 2.23.1 release notes, this release:

  • Fixes a bug where an @Inject method has a parameter name that is valid on the JVM but invalid for the Java language (and can come up in some cases in Kotlin: a11605c)
  • Suppresses all unchecked/rawtypes warnings in Dagger generated code (ce23333)

Dagger 2.23.1

30 May 14:53
Compare
Choose a tag to compare

In addition to the 2.23 release notes, this release fixes support for gradle incremental annotation processing (a91d962)

Dagger 2.23

28 May 22:01
Compare
Choose a tag to compare
  • Validation/strictness
    • Generated components are no longer public unless the component type is public (298dea8)
    • @BindsInstance annotations are now more strictly validated (d3ed46d)
  • Build performance
    • Generated code is no longer formatted by default. Use -Adagger.formatGeneratedSource=enabled to turn it on. (fcd069c)
    • General build performance improvements (7e374b5)
  • Android
    • Added dagger.android.HasAndroidInjector, which will soon replace the Has*Injector interfaces. This one interfaces coalesces the others and should be functionally equivalent. (8f01526)
  • Full Binding Graph Validation
    • Rename -Adagger.moduleBindingValidation to -Adagger.fullBindingGraphValidation. The old name continues to work as an alias. (add5a74)
    • Do full binding graph validation for components and subcomponents, not just modules. (15d20f8)
  • Bug Fixes
    • Fixed an issue where @BindsInstance on a Builder setter method's parameter caused a failure in codegen if the parameter had a different name than the method itself (#1464). (8051d28)

Dagger 2.22.1

03 Apr 00:26
Compare
Choose a tag to compare

In addition to the 2.22 release notes, this release fixes an issue where @BindsInstance on a @Component.Builder setter method's parameter caused a failure in code generation if the parameter had a different name than the method itself (#1464). (8051d28)

Dagger 2.22

02 Apr 18:20
Compare
Choose a tag to compare

NOTE: A bug in the Dagger compiler was introduced in this release. A fix is available in 2.22.1

  • Add the ability to create @Component.Factory types for components instead of @Component.Builders. An @Component.Factory is stateless and has a single method, returning the creator type, that takes parameters for anything that a Builder could have setters for. (d340886)
  • @BindsInstance can now be applied to the parameter of a setter method on a builder rather than to the setter method itself, for consistency with factory methods. (60dc2a6)
  • When a single instance of a component builder with no setter for a particular module that Dagger can instantiate is used to instantiate multiple component instances, provide a new instance of that module to each component rather than caching and reusing a single instance of the module for each component. (fa714e9)
  • Public modules are now allowed to include non-public modules when those included modules do not require an instance: that is, they only have abstract and/or static binding methods. (bfdecad)
  • Fix @BindsOptionalOf methods to require that they have a different name than any other binding method in the module; this was already true for all other types of binding methods (@Provides, @Binds etc.) but @BindsOptionalOf wasn't being included. (1ea36ec)
  • Report an error for scopes on @Multibinds methods. This was never supported, but the scope was previously ignored. (9582bc3)
  • Limit the number of requests and entry points reported explicitly for errors. (1d5d829)
  • SPI: Renamed BindingKind.SUBCOMPONENT_BUILDER to SUBCOMPONENT_CREATOR to reflect the fact that it can be a builder or a factory, and renamed the edge type to SubcomponentCreatorBindingEdge. (65e2209)
  • Build performance improvements: