Skip to content

Dagger 2.32

Compare
Choose a tag to compare
@Chang-Eric Chang-Eric released this 08 Feb 22:39
· 1169 commits to master since this release

What’s New

Dagger

  • Parameters in @AssistedFactory classes that have the same type now require a name to be set via @Assisted("foo") to disambiguate between arguments. Previously, order of parameters was used. Fixes #2281. (44d4f4b)

Bug fixes

  • Fix #2359: Fixes self-loop when a generated implementation of an @AssistedFactory method calls a generated component method with the same name. (e2c9a9a)
  • Fix @AssistedFactory to allow for creating a parameterized Foo with type parameters specified by the factory. (552f430)
  • Issue #2279: Adds a better error message when trying to use a type parameter with an @AssistedFactory creator method. (9a90151)
  • Fix #2309: Fix a type inference issue with generated assisted factories in Java 7. (cda6e32)

Hilt

  • A new delayComponentReady() method on HiltAndroidRule allows deferring component initialization in tests until after test execution has started. This allows modifying @BindValue field values in the case that default component initialization would have otherwise requested them before an @Before or @Test method. (315b1fa)
  • HiltAndroidRule now enforces that inject() is only called at most once per test case. (5dfd484)
  • Removes the deprecated ApplicationComponent. Note that this will now require upgrading any Androidx Hilt Worker dependencies to version 1.0.0-alpha03. (6592b06)
  • Fix #2337: Fix an incompatibility issue between the Hilt Gradle Plugin and AGP 4.2.0-beta04. Note that this fix makes it so that earlier versions of AGP 4.2.0 are incompatible with Hilt's Plugin. (9da5114)

Bug fixes

  • Fix #2306: Fix an issue where internal Kotlin classes where not accessible with enableExperimentalClasspathAggregation turned ON. (53ceb91, 98c73c6)
  • Fix an issue where an @InstallIn module referencing a component without a component builder would fail (132d9ea)