Releases: google/dagger
Release list
Dagger 2.60
New features:
- Fixes #5165: Support nullable type annotations when using the flag
-Adagger.nullableTypeAnnotations=enabled.
For more details see https://dagger.dev/dev-guide/compiler-options#nullable-type-annotations. (4bedb4b) - Fixes #5087: When using the Hilt Gradle plugin, you
can now disable fastInit mode from the command line,
e.g.-Pdagger.hilt.fastInit=false. For more details see https://dagger.dev/hilt/flags#fast-init. (0f7642b) - Introduced parameterless
@Bindsmethods to explicitly bind@Injectconstructors. For more details see https://dagger.dev/dev-guide/#parameterless-binds. (4c81e94)
Potential breaking changes:
- When using the Hilt Gradle plugin, an error is now reported if a user sets a plugin-controlled flag (previously the plugin just ignored the user’s input). (a119ba6)
- Multidex support is removed. minSDK for Hilt is now 23, matching AndroidX
(https://issuetracker.google.com/380448311) (1990bd1)
Bug fixes:
- Fixes #1290: Enabled Guava BetaApi checks (5b8b2bd)
- Fixes #5190, #5180, #5177: Updated Kotlin version ton 2.3.21 (7daaec5)
- Fixes #5160: Deferred ViewModelMetadata processing on error types or missing @AssistedFactory (59827c6)
- Fixes missing originating element attachments in a few Hilt processors to ensure correct incremental compilation tracking. (2930ca8)
- Fixes Dagger multibinding duplicate masking across Map components (compile-time validation)
Adds strict compile-time detection for duplicate map multibinding keys across component boundaries. This is enabled via the-Adagger.mapMultibindingDuplicateDetectionFix=ENABLED. This option isDISABLEDby default to maintain backward compatibility. See Compiler Options for more details. (504397e)
Dagger 2.59.2
Dagger 2.59.1
Dagger 2.59
Breaking changes:
(If you do not use Hilt or the Hilt Gradle plugin, this change does not affect you.)
This release adds AGP 9 support for the Hilt Gradle plugin. This means that if you use the Hilt Gradle Plugin, AGP 9 is now a requirement along with AGP 9’s own requirements like Gradle 9.1+ (https://developer.android.com/build/releases/agp-9-0-0-release-notes).
Note: AGP 9 also seems to cause issues with enableJetifier=true (see #5099). This will be fixed in a follow-up release.
Bug fixes/features:
Dagger 2.58
Note: AGP 9 support was held back from this release (0a5b42c) because it forces users onto AGP 9. It will be available in the next Dagger release (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.
Bug fixes/features:
Dagger 2.57.2
Bug fixes
- Fixed #4847: Fixed an issue with the Hilt Gradle Plugin registered transforms on projects using Gradle 9.0.0 (ea570e7)
- Fixes #4898: Fixed an issue with backwards compatibility handling for libraries that export Hilt roots. (85c470c)
- Fixes #4937: Fixed the incorrectly declared version of the Kotlin stdlib dependency in the Hilt Gradle Plugin. (deefd9a)
- Updated ASM dependency to 9.8 (365bc49)
Dagger 2.57.1
Bug fixes
- Fixes #4734: Updated Hilt's Gradle Plugin detection of AGP to maximize compatibility and avoid the confusing 'The Hilt Android Gradle plugin can only be applied to an Android project.' error when the plugin is on an Android project. (20adecb)
- Fixes #4848: Set coreLibrariesVersion for the Kotlin compilation of the Hilt Gradle Plugin to further improve backwards compatibility. (00c7fc2)
- Fixes #4848: Use api / language versions for the Kotlin compilation of the Hilt Gradle Plugin to not force projects to update to Kotlin 2.2.0, the current version used by the plugin. (58e4992)
- Fixes #4780: Add support for the Jakarta Singleton annotation in Hilt. (ec7f76f)
- Fixes #4917: Removes the explicit dependency to androidx.annotation:annotation-jvm and to a beta version of it. (092a85a)
- Limit number of similar bindings shown in error messages to 20 (59ac2f9)
- Update wording for @AssistedInject error to be more specific. (1702e79)
Dagger 2.57
Potential breaking changes
The generated Factory/MembersInjector constructors have changed from public to private. This shouldn’t affect most users since these classes are only meant to be called by Dagger’s other generated code. If you do happen to be broken by this change, you should avoid calling Dagger’s generated Factory/MembersInjector classes directly. For a temporary solution, you can also switch to using the public static methods to create an instance. (165cf20)
Bug fixes
Fixes #4779. Unshades the Kotlinx Metadata to support Kotlin 2.2.0 (bfa88b9)
Dagger 2.56.2
Dagger 2.56.1
Bug fixes
- [Dagger] Fixed #4624: Shade Dagger's javapoet-kotlinpoet dependency.