If you depend on androidx.hilt:hilt-common or androidx.hilt:hilt-work they will need to be updated to at least 1.1.0-alpha01.
Also note that Dagger’s KSP processors are still in the alpha stage. So far we’ve focused mainly on trying to ensure correctness rather than optimize performance. Please apply due diligence when enabling ksp and report any bugs or performance issues at https://github.com/google/dagger/issues. The current list of known issues can be found here.
There are also a few potentially breaking changes included with this release. These changes were made to better support Dagger usage with Kotlin sources, and make the migration from KAPT to KSP more seamless. We don’t expect these changes to affect most users. Please see below for more details.
Breaking changes
The dagger.ignoreProvisionKeyWildcards is now enabled by default
This may break apps that are providing the same binding with different wildcards, e.g. Foo<Bar> and Foo<? extends Bar>.
Unlike KAPT, KSP takes nullability into account when checking if a type is assignable to another type. This changes the behavior of Dagger’s @Binds usage validation such that a type that was assignable in KAPT may no longer be assignable in KSP. For example:
// Incorrect: this compiles successfully in KAPT but the compilation fails in KSP
@Binds fun bind(impl: FooImpl<Bar?>): Foo<Bar>
Fix: To fix this breakage, users should update the parameter or return type in the method such that they are actually assignable when taking nullability into account. For example:
// Correct: this compiles successfully in KAPT and KSP
</tr></table>
If you depend on androidx.hilt:hilt-common or androidx.hilt:hilt-work they will need to be updated to at least 1.1.0-alpha01.
Also note that Dagger’s KSP processors are still in the alpha stage. So far we’ve focused mainly on trying to ensure correctness rather than optimize performance. Please apply due diligence when enabling ksp and report any bugs or performance issues at https://github.com/google/dagger/issues. The current list of known issues can be found here.
There are also a few potentially breaking changes included with this release. These changes were made to better support Dagger usage with Kotlin sources, and make the migration from KAPT to KSP more seamless. We don’t expect these changes to affect most users. Please see below for more details.
Breaking changes
The dagger.ignoreProvisionKeyWildcards is now enabled by default
This may break apps that are providing the same binding with different wildcards, e.g. Foo<Bar> and Foo<? extends Bar>.
Unlike KAPT, KSP takes nullability into account when checking if a type is assignable to another type. This changes the behavior of Dagger’s @Binds usage validation such that a type that was assignable in KAPT may no longer be assignable in KSP. For example:
// Incorrect: this compiles successfully in KAPT but the compilation fails in KSP
@Binds fun bind(impl: FooImpl<Bar?>): Foo<Bar>
Fix: To fix this breakage, users should update the parameter or return type in the method such that they are actually assignable when taking nullability into account. For example:
// Correct: this compiles successfully in KAPT and KSP
</tr></table>
Changed Gradle Metadata to include dependency versions directly. This may address "Could not find some-dependency" errors that some users have reported (which might be a result of users' excluding guava-parent). (c6d35cf1a5)
collect: Changed Multisets.unmodifiableMultiset(set).removeIf(predicate) to throw an exception always, even if nothing matches predicate. (61dbccfda3)
graph: Fixed the behavior of Graph/ValueGraph views for a node when that node is removed from the graph. (950799691c)
io: Fixed Files.createTempDir and FileBackedOutputStream under Windows services, a rare use case. (The fix actually covers only Java 9+ because Java 8 would require an additional approach. Let us know if you need support under Java 8.) (f87f68cd3e)
net: Made MediaType.parse allow and skip over whitespace around the / and = separator tokens in addition to the ; separator, for which it was already being allowed. (2786f83291)
util.concurrent: Tweaked Futures.getChecked constructor-selection behavior: The method continues to prefer to call constructors with a String parameter, but now it breaks ties based on whether the constructor has a Throwable parameter. Beyond that, the choice of constructor remains undefined. (For this and other reasons, we discourage the use of getChecked.) (59cfb2267a)
Bumps the maven-dependencies group with 15 updates:
2.44.2
2.48.1
2.44.2
2.48.1
32.0.0-jre
32.1.3-jre
3.1.4
3.1.8
2.0.3
2.0.9
2.0.3
2.0.9
5.9.1
5.10.1
4.9.0
5.2.0
3.10.1
3.11.0
3.0.0-M7
3.2.2
3.2.1
3.3.0
3.4.1
3.6.2
8.1.2
9.0.0
0.8.8
0.8.11
3.0.1
3.1.0
Updates
com.google.dagger:dagger
from 2.44.2 to 2.48.1Release notes
Sourced from com.google.dagger:dagger's releases.
... (truncated)
Commits
2d9ba60
2.48.1 release378535e
Refactor ResolvedBindings and LegacyBindingGraph to include the ComponentPath.fd907cb
Allow sharding for Dagger compiler tests.558cc51
Fix Dagger's incremental processing for KSP.5cc209c
[Refactor]: This CL refactors a few things inComponentDescriptor
.e8f5f2b
Drop latest XProcessing jars into Dagger.7412301
Internal changes76bde06
Rollback of "[Refactor] Remove duplicated logic inBindingGraphFactory
"e651294
Fix Lint crash with AGP 8.1.0. See google/dagger#4023...47953aa
[Refactor] Remove duplicated logic inBindingGraphFactory
.Updates
com.google.dagger:dagger-compiler
from 2.44.2 to 2.48.1Release notes
Sourced from com.google.dagger:dagger-compiler's releases.
... (truncated)
Commits
2d9ba60
2.48.1 release378535e
Refactor ResolvedBindings and LegacyBindingGraph to include the ComponentPath.fd907cb
Allow sharding for Dagger compiler tests.558cc51
Fix Dagger's incremental processing for KSP.5cc209c
[Refactor]: This CL refactors a few things inComponentDescriptor
.e8f5f2b
Drop latest XProcessing jars into Dagger.7412301
Internal changes76bde06
Rollback of "[Refactor] Remove duplicated logic inBindingGraphFactory
"e651294
Fix Lint crash with AGP 8.1.0. See google/dagger#4023...47953aa
[Refactor] Remove duplicated logic inBindingGraphFactory
.Updates
com.google.guava:guava
from 32.0.0-jre to 32.1.3-jreRelease notes
Sourced from com.google.guava:guava's releases.
... (truncated)
Commits
Updates
com.github.ben-manes.caffeine:caffeine
from 3.1.4 to 3.1.8Release notes
Sourced from com.github.ben-manes.caffeine:caffeine's releases.
Commits
b0723da
minor build plugin upgrades82cf9a3
Fix issue #1111 by not creating methodType on each invocation (to work around...b1462dd
simplify and document the coalescing bulkloader example (fixes #7)f3a9345
document the write-behind-rxjava example2c7b878
Improve hibernate example and add resilience example using failsafec2befe9
Bump EnricoMi/publish-unit-test-result-action from 2.8.0 to 2.9.0 (#1109)30b3813
upgrade error prone and hibernate6f0f14e
Bump com.uber.nullaway:nullaway from 0.10.11 to 0.10.12 (#1108)17677fa
Bump org.checkerframework:checker-qual from 3.36.0 to 3.37.0 (#1107)67b36d6
Bump crate-ci/typos from 1.16.1 to 1.16.2 (#1105)Updates
org.slf4j:slf4j-api
from 2.0.3 to 2.0.9Updates
org.slf4j:slf4j-simple
from 2.0.3 to 2.0.9Updates
org.junit.jupiter:junit-jupiter
from 5.9.1 to 5.10.1Release notes
Sourced from org.junit.jupiter:junit-jupiter's releases.
Commits
e5f50d8
Release 5.10.1ac86d18
Fix typo in AfterAll documentation388c5be
Harmonize application of method and field filters in search algorithmsf82dd1e
Apply field predicate before searching type hierarchy1d1eb85
Polishing5ce280e
Update picocli to 4.7.5 and enable help width computationfea05c3
Fix ConsoleLauncherTests and StandaloneTestsc556735
Use same expected files for all JDK versions808493a
Run StandaloneTests for Java 8 under Java 89ec5766
Unify messages about exit codes in StandaloneTestsUpdates
org.mockito:mockito-inline
from 4.9.0 to 5.2.0Release notes
Sourced from org.mockito:mockito-inline's releases.
... (truncated)
Commits
74c811a
Make InjectMocks aware of generic types (#2923)fc136e4
Explicitly use UTF-8 in IOUtils (#2935)9473470
Bump io.github.gradle-nexus:publish-plugin from 1.2.0 to 1.3.0 (#2932)dddeb72
Bump versions.bytebuddy from 1.14.0 to 1.14.1 (#2931)92ed602
Bump com.google.googlejavaformat:google-java-format from 1.15.0 to 1.16.0 (#2...19ef24a
Bump com.diffplug.spotless from 6.15.0 to 6.16.0 (#2930)8b96cc1
Bump io.github.gradle-nexus:publish-plugin from 1.1.0 to 1.2.0 (#2924)4eb275c
Make project relocatable by using relative paths in the OSGi test task (#2920)d937334
Bump com.github.ben-manes.versions from 0.45.0 to 0.46.0 (#2922)60b0e71
Bump versions.bytebuddy from 1.13.0 to 1.14.0 (#2918)Updates
org.apache.maven.plugins:maven-compiler-plugin
from 3.10.1 to 3.11.0Release notes
Sourced from org.apache.maven.plugins:maven-compiler-plugin's releases.
... (truncated)
Commits
eeda628
[maven-release-plugin] prepare release maven-compiler-plugin-3.11.082b799f
[MCOMPILER-527] Upgrade plexus-java to 1.1.2 (#177)f9c2350
[MCOMPILER-526] Fix IT (#178)4022bd0
[MCOMPILER-494] - Add auseModulePath
switch to thetestCompile
mojo (#119)f4a8a54
[MCOMPILER-525] Incorrect detection of dependency change (#172)86b9f59
[MCOMPILER-395] Allow dependency exclusions for 'annotationProcessorPaths' (#...e304ceb
[MCOMPILER-526] Ignore reformat commit for git blamef7a4613
[MCOMPILER-526] Reformatcc78aee
[MCOMPILER-526] Upgrade to parent 393dca82f
[MCOMPILER-526] Add packages to please the formatterUpdates
org.apache.maven.plugins:maven-surefire-plugin
from 3.0.0-M7 to 3.2.2Release notes
Sourced from org.apache.maven.plugins:maven-surefire-plugin's releases.
... (truncated)
Commits
2d76753
[maven-release-plugin] prepare release surefire-3.2.2dd640bf
[SUREFIRE-2208] Bump org.codehaus.plexus:plexus-java from 1.1.2 to 1.2.0 (#682)dd2fcfd
[SUREFIRE-2205] Use maven-plugin-report-plugin only in plugins modules03c71d1
[SUREFIRE-2206] Downgrade plexus-xml to 3.0.0c3c3c84
Use Maven 3.x.x and 3.6.3 on Jenkinsa540ef4
[SUREFIRE-2205] Mojo documentation links are broken3a58f29
[maven-release-plugin] prepare for next development iterationdf9f657
[maven-release-plugin] prepare release surefire-3.2.10910b75
Fix formatting97c84a1
[maven-release-plugin] prepare for next development iterationUpdates
org.apache.maven.plugins:maven-source-plugin
from 3.2.1 to 3.3.0Commits
02a9847
[maven-release-plugin] prepare release maven-source-plugin-3.3.0f186993
[MSOURCES-135] Cleanup project code021af55
[MSOURCES-134] Refresh download pageb11a457
Use shared GitHub actions v37caf2b0
[MSOURCES-133] Upgrade Parent to 39 - ignore git blamedee4c10
[MSOURCES-133] Upgrade Parent to 39452111f
Add dependabot configuratione691ac3
s/MSOURCE/MSOURCES/1ddffd8
Auto-link MSOURCE Jira37ffefe
Add pull request templateUpdates
org.apache.maven.plugins:maven-javadoc-plugin
from 3.4.1 to 3.6.2Release notes
Sourced from org.apache.maven.plugins:maven-javadoc-plugin's releases.