Note: The next Dagger release will require AGP 9 when using the HiltGradlePlugin. (e92e3f3)
Potential breaking changes:
- Flipped default for
dagger.useBindingGraphFixtoenabled(d41e836).
See https://dagger.dev/dev-guide/compiler-options#useBindingGraphFix.
Fix: If this change breaks you it’s likely due to providing a binding in an incorrect module, (e.g. the binding requests an Activity but is installed in the SingletonComponent). The fix is to move the@Providesso that it is installed into the correct component (e.g. the ActivityComponent instead of SingletonComponent). You can also setdagger.useBindingGraphFix=disabledbut note that this flag is only temporary and will eventually be removed. - The use of
abstract varin components is now banned in super types.
The reason for this change is that anabstract varproperty creates both a getter and a setter on the component which is almost always unintentional.
Fix: If this change breaks you, use either anabstract val foo: Fooif you need a getter orabstract fun inject(foo: Foo)if you need an inject method. Note thatabstract varis already banned if it is declared directly on the@Componentclass/interface, but this change fixes the check so that it’s banned even if it’s inherited from a super type.