All Versions
Latest Version
Avg Release Cycle
33 days
Latest Release
1246 days ago

Changelog History
Page 1

  • v2.30.1 Changes

    November 24, 2020

    πŸ› Bug fixes

    • πŸš€ Sets the default value for experimentalDaggerErrorMessages back to disabled since it breaks hyperlinks in AndroidStudio (6a8bbbf) . Note that this reverses the change to the default value made in the release 2.30.
    • πŸ›  Fixes #2190: Dagger was unnecessarily inspecting all fields of a class and attempting to find their Kotlin metadata, which sometimes led to crashing the processor. Now, Dagger inspects the Kotlin metadata lazily, and only on the fields that require it. (a885c85)
  • v2.30 Changes

    November 20, 2020

    What’s new


    πŸš€ Hilt has deprecated ApplicationComponent (6313cbd), and it will soon be removed in a future release. Use SingletonComponent instead.

    πŸ‘ Hilt now supports @BindValue val fields in Kotlin without the use of @JvmField (802882d). For example:

    // Before@BindValue @JvmField val bindStr = "STRING\_BINDING"// Now@BindValue val bindStr = "STRING\_BINDING"


    πŸ‘€ Dagger now uses the β€œexperimentalDaggerErrorMessages” by default (See #1769 for more information). The old error message format can still be used by setting -Adagger.experimentalDaggerErrorMessages=disabled as a javacopt.

    πŸ› Bug Fixes

    • πŸ›  [Dagger]: Fixes a Dagger compiler crash that occurred when an @Inject was placed in a Kotlin object class. (0816c43)
    • ⚑️ [Hilt]: Fixes #2156: Update Dagger's androidx dependencies to the latest stable versions. (deff5e5)
    • πŸ—„ [Hilt]: Fixes suppress deprecation warning in Hilt generated Fragment class. (0a463eb)
    • 🚚 [Hilt]: Removes Hilt's dependency on jsr250 for @Generated. (8dca74b)
      Note: Hilt previously depended on jsr250 for the @Generated annotation, but this behavior has now been changed to match Dagger (see #95). Now, Hilt only adds the @Generated annotation only if the Generated class is present in the classpath. Thus, since we’ve now removed the jsr250 dependency from Hilt, the generated code will no longer contain the @Generated annotation by default.
  • v2.29.1 Changes

    September 10, 2020

    What’s New


    πŸ‘€ Hilt has two new artifacts hilt-core and hilt-compiler that allow Hilt to be used with pure Java/Kotlin libraries within an AndroidApplication (see issue #1908 for the full motivation/discussion).

    The hilt-core artifact contains the core (non-Android) Hilt APIs. Note that this artifact is only meant to be used by pure Java/Kotlin libraries within an Android application. Hilt does not currently support non-Android applications or non-Android tests.

    The hilt-compiler artifact is just a rename of hilt-android-compiler. The motivation here is to have a single compiler artifact that works with both Android and non-Android libraries. The hilt-android-compiler artifact will be deprecated in a future release, so please migrate to hilt-compiler.

    The example below shows which artifacts to use in an Android vs pure Java/Kotlin library.

    // Android library depsdependencies { implementation "" androidTestImplementation "" annotationProcessor "" // or kapt}// Pure Java/Kotlin library depsdependencies { implementation "" annotationProcessor "" // or kapt}


    πŸ‘€ A new Dagger compiler option was added to allow disabling transitive validation of component dependency, dagger.validateTransitiveComponentDependencies,. The default value for the flag is enabled (same as before). To disable it, add the following to your compiler options: -Adagger.validateTransitiveComponentDependencies=DISABLED. For a full motivation/discussion, see issue #970.

    πŸš€ A new Dagger compiler option was added to fix an issue with map binding contributions that depend on subcomponent bindings, dagger.strictMultibindingValidation. The default value for the flag is disabled (same as before). However, we will be enabling this flag in a future release. To check if your application will be affected, you can enable the flag by adding the following to your compiler options: -Adagger.strictMultibindingValidation=ENABLED. See #2085 for details.

    Potential breaking changes

    • πŸ›  Fix an issue where in some cases missing bindings may have been missed during validation. This issue also affects the binding graph that SPI plugins receive so this fix may cause changes where a previously incorrect binding graph was being supplied. (08193ad)

    πŸ› Bug Fixes

    • πŸ›  Fix #1955, #2065: Hilt would incorrectly try to transform native methods on classes annotated with @AndroidEntryPoint. (2099bad, 2099bad)
    • πŸ›  Fix #1918: Support BroadcastReceiver with @AndroidEntryPoint transform. (ede018b)
    • πŸ›  Fix #1997: Allow Hilt modules to have constructors with params as long as a no-arg constructor exists. (07a7fa9)
    • πŸ›  Fix #2042: Fix bug in OriginatingElementProcessor and ban @AndroidEntryPoint classes with type parameters. (bee2e9a)
    • πŸ›  Fix #970: Add -Adagger.validateTransitiveComponentDependencies compiler option to prevent validating transitive component dependencies. (6deafc7)
    • βž• Add -Adagger.strictMultibindingValidation compiler option to fix map binding contributions that depend on subcomponent bindings. (fb47e11)
    • πŸ›  Fix issue with @Binds when the impl extends a generated type. (71509b8)
    • βž• Add support for receiving a callback for when the activity retained component will no longer be used and destroyed. (6300d02, 218df98)
    • Throw when a race is detected adding a OnClearedListener. (7cf8b11)
    • ⬇️ Reduce constant pool usage by renaming private methods (4a31157)
  • v2.29 Changes

    September 10, 2020

    Do not depend on this release

    πŸš€ Depend on release 2.29.1 instead, which fixes issue #2086.

  • v2.28.3 Changes

    July 17, 2020

    πŸ› Bug fixes


    • πŸ›  Fix #1987: Fixes a bug in version 2.28.2 that occurs when a transitive dependency installs something into ApplicationComponent and depends on a version of Hilt less than 2.28.2. (667a8e2)
  • v2.28.2 Changes

    July 15, 2020

    What’s new


    πŸš€ The Hilt class is being renamed to dagger.hilt.components.SingletonComponent. This release adds the new SingletonComponent class in preparation for this change without removing the existing ApplicationComponent. This rename is part of a plan to address #1908 to allow usage of Hilt in non-Android Gradle modules when installing into the SingletonComponent. Current users can begin switching to the new SingletonComponent name as of this release. A future release will remove ApplicationComponent.

    πŸ› Bug fixes


    • πŸ›  Fix #1980: Added missing FIELD target to @ActivityContext qualifier. (29e080f)
    • πŸ›  Fix #1909: Update Dagger's JavaPoet dependency to 1.13.0 containing fixes for Dagger & Hilt related to generating code with overriding methods without annotations. (c5de4ab)
    • πŸ›  Fix #1955: Fixes issue with bytecode transformation in Gradle plugin to allow @AndroidEntryPoint annotations to be used with abstract classes containing abstract methods. (884fee5)
    • πŸ›  Fix #1947: Fixes issue with Hilt base classes that extend other Hilt base classes. (61c5c43)
    • πŸ›  Fix #1917: Fixes Hilt example app for Gradle users on mac. (5b3a966)
  • v2.28.1

    June 18, 2020
  • v2.28

    May 26, 2020
  • v2.27 Changes

    March 13, 2020

    What's New

    1. Fix #955: No longer generate MembersInjectors for types without local injection sites. (20f6442)
    2. Fix #1414: Allow multiple scoped component dependencies (113c498) πŸ‘ 3. Fix #1734: Add support constructor with content layout id for AndroidX (22b2726) 🚚 4. Fix #1740: Remove a usage of Guava API not available in the '-android' variant in case of processor classpath conflicts. (bfb87d5)
    3. Fix #1665: Add an explicit check for member injection of Kotlin object classes rather than crashing. (550d696)
    4. Fix: #1612: Fix duplicate binding errors when a component dependency has the same method defined multiple times via multiple interfaces (0bb69e9)

    Experimental Error Message Format

    πŸš€ This release includes a flag for using the new experimental error message format. The format and some content of error messages will be changed with this flag in order to improve readability. Please leave feedback on issue #1769. Pending feedback, this format will eventually become the default and replace current error messages.

    To opt-in to the new format use -Adagger.experimentalDaggerErrorMessages=enabled.

    Currently, this flag:

    • Shortens all class names to the simple class name. A legend is output at the bottom of the errors to map short names to fully qualified names.
    • Reports errors as a single error for each root component.
    • βž• Adds color to error tags to visibly separate individual errors
    • ⬇️ Reduces some extraneous information from some messages.
  • v2.26 Changes

    January 30, 2020

    What's new

    🚚 1. Fix #1700: Remove usages of non-Android Guava APIs. (0925e8f)

    1. Fix #1720: Fix incremental dagger-android-processor in kapt when using (6a0ce58)
    2. Fix #1721: Migrate dagger-android to AndroidX. (f45213e) πŸ‘ 4. Better support for binding declarations within Kotlin companion objects of @Module annotated classes. (8190c7c)

    Known breaking changes

    Companion object modules are no longer allowed on Component#modules list (8190c7c)

    It is now an error to add an @Module annotated companion object class to Component#modules (or Subcomponent#modules) list. Instead, only the outer class should be added to the module list.

    // Only add this class to the Component#modules list.@Moduleabstract class FooModule { @Binds abstract fun bindFoo(impl: FooImpl): Foo// @Module is no longer needed here!companion object { // @JvmStatic is no longer needed here!@Provides fun provideBar(): Bar = Bar() } }

    πŸš€ Note: For backwards compatibility, we still allow @Module on the companion object and @JvmStatic on the provides methods. However, @Module on the companion object is now a no-op and all of its attributes (e.g. "includes") will be ignored. In future releases, we will make it an error to use @Module on a companion object.

    Dagger Android artifacts now use Androidx (f45213e)

    πŸ‘ The following artifacts have been migrated from the support library to AndroidX:

    • πŸ‘

    πŸ‘ This change may break users who have not already migrated to AndroidX. The fix is to either migrate your app to AndroidX, or switch back to the support library artifacts which are now available at:

    • πŸ‘