Skip to content

Dagger 2.30

Compare
Choose a tag to compare
@bcorso bcorso released this 20 Nov 18:37
· 1250 commits to master since this release

What’s new

Hilt

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

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.