Dagger 2.37
What’s New in Dagger
Bug Fixes
- Fix #1079: Added an automatic module name to the
com.google.dagger:dagger
artifact to improve Java 9 compatibility. (cb30885) - Removed the
com.google.dagger:dagger-android-jarimpl
artifact. This was an internal-only artifact, so its removal should not affect users. (6da2e7e)
What’s New in Hilt
Build performance improvements for Gradle
There’s a new flag, enableAggregatingTask
, supported by the Hilt Gradle plugin that allows Hilt to perform classpath aggregation in a dedicated Gradle task. This allows Hilt’s annotation processors to be “isolating” so that they are only invoked when necessary. This reduces incremental compilation times by reducing how often an incremental change causes a rebuild of the Dagger components. For details on how to enable this flag see https://dagger.dev/hilt/gradle-setup#aggregating-task.
Note that the default for enableAggregatingTask
is currently false
, but it will be changed to true
in an upcoming release, so please try to enable this flag and report any issues.
Also, note that enableAggregatingTask
will automatically enable sharing test components
, so please read the caveats for enabling that flag as well.
Finally, enableAggregatingTask
replaces enableExperimentalClasspathAggregation
which will be removed in an upcoming release. Please replace any usages of enableExperimentalClasspathAggregation
with enableAggregatingTask
.
Bug Fixes
- Fix #2662: Fixes an issue in Hilt's bytecode transform that would cause classes to fail validation if they contained an instantiation of an object whose type is the same as the superclass of the @androidentrypoint annotated class. (839a849)