Dagger2 v2.30 Release Notes
Release Date: 2020-11-20 // over 5 years ago-
What’s new
Hilt
🚀 Hilt has deprecated
ApplicationComponent(6313cbd), and it will soon be removed in a future release. UseSingletonComponentinstead.👍 Hilt now supports
@BindValue valfields 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=disabledas 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@Generatedannotation, but this behavior has now been changed to match Dagger (see #95). Now, Hilt only adds the@Generatedannotation only if theGeneratedclass is present in the classpath. Thus, since we’ve now removed the jsr250 dependency from Hilt, the generated code will no longer contain the@Generatedannotation by default.