tag:github.com,2008:https://github.com/google/dagger/releasesRelease notes from dagger2025-01-09T19:37:54Ztag:github.com,2008:Repository/7968417/dagger-2.552025-01-09T21:17:59ZDagger 2.55<h1>Notable/breaking changes</h1>
<ul>
<li>Added support for injecting <code>jakarta.inject.Provider</code>. This should be usable anywhere <code>javax.inject.Provider</code> is usable. Note that this technically comes with a breaking change to disallow providing <code>jakarta.inject.Provider</code> types in the same way it is disallowed for <code>javax.inject.Provider</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/caa7e178bd1a1ca6bd6ea569f2334f02a55b59cc/hovercard" href="https://github.com/google/dagger/commit/caa7e178bd1a1ca6bd6ea569f2334f02a55b59cc"><tt>caa7e17</tt></a>)</li>
<li>Fixed a number of binding graph related issues.<br>
These fixes can be enabled with, <code>-Adagger.useBindingGraphFix=ENABLED</code>, but due to this sometimes being a breaking change we’ve set the default behavior to “disabled” for now. We will flip the default to “enabled” in a future release, and eventually remove the flag altogether. Enabling this feature can fix a number of confusing error messages. See <a href="https://dagger.dev/dev-guide/compiler-options#useBindingGraphFix" rel="nofollow">https://dagger.dev/dev-guide/compiler-options#useBindingGraphFix</a> for more details.</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2753500901" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4549" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4549/hovercard" href="https://github.com/google/dagger/issues/4549">#4549</a>: Fixed incremental processing for LazyClassKey proguard files by adding the<br>
originating element to the <code>writeResource</code> call. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/98a0275416cae5afaad5e70a051137a28b3a8201/hovercard" href="https://github.com/google/dagger/commit/98a0275416cae5afaad5e70a051137a28b3a8201"><tt>98a0275</tt></a>)</li>
</ul>bcorsotag:github.com,2008:Repository/7968417/dagger-2.542024-12-20T19:31:58ZDagger 2.54<h1>Bug fixes</h1>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2284335411" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4303" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4303/hovercard" href="https://github.com/google/dagger/issues/4303">#4303</a>: Upgrade Hilt Gradle Plugin to support KSP2 configuration. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/76b581999a81a4a6e91d5f5fc6b51639095575b2/hovercard" href="https://github.com/google/dagger/commit/76b581999a81a4a6e91d5f5fc6b51639095575b2"><tt>76b5819</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2751091211" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4544" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4544/hovercard" href="https://github.com/google/dagger/issues/4544">#4544</a>: Removes private from InstanceHolder field to avoid unnecessary accessor method. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/07d8f883f1f1e1fe6787228b05741d8dd8633bd4/hovercard" href="https://github.com/google/dagger/commit/07d8f883f1f1e1fe6787228b05741d8dd8633bd4"><tt>07d8f88</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2727205254" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4533" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4533/hovercard" href="https://github.com/google/dagger/issues/4533">#4533</a>: Fixes path separator for Windows when creating LazyClassKey proguard file. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/efa421a3fcd03a0453f76825741cd8307eea067e/hovercard" href="https://github.com/google/dagger/commit/efa421a3fcd03a0453f76825741cd8307eea067e"><tt>efa421a</tt></a>)</li>
</ul>
<h1>Notable changes</h1>
<ul>
<li>In preparation for jakarta support, Dagger’s generated factories now include a <code>create()</code> method that uses <code>dagger.internal.Provider</code> rather than <code>javax.inject.Provider</code>. For now, the <code>javax.inject.Provider</code> <code>create()</code> method is also kept for compatibility, but it will be removed in a future release. When that happens, libraries built with the newer version of Dagger may break downstream users of <code>@Component</code> that are built with an older version of Dagger. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/d60729d20cd0daf422916b1e2b90e5d73c951699/hovercard" href="https://github.com/google/dagger/commit/d60729d20cd0daf422916b1e2b90e5d73c951699"><tt>d60729d</tt></a>)</li>
</ul>bcorsotag:github.com,2008:Repository/7968417/dagger-2.53.12024-12-09T18:10:17ZDagger 2.53.1<h1>Bug fixes</h1>
<ul>
<li>Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2714346525" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4525" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4525/hovercard" href="https://github.com/google/dagger/issues/4525">#4525</a>: Update kotlin-jvm-metadata to 2.0.21 to remove dependency on Beta version. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/84d3aa5f1bda40af532d9b5f35e957dbdea901dd/hovercard" href="https://github.com/google/dagger/commit/84d3aa5f1bda40af532d9b5f35e957dbdea901dd"><tt>84d3aa5</tt></a>)</li>
<li>Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2714925267" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4526" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4526/hovercard" href="https://github.com/google/dagger/issues/4526">#4526</a>: Add the originating element in LazyMapKeyProxyGenerator. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/5fd8ec1a39f568d67bd6644abe821729ba6a0725/hovercard" href="https://github.com/google/dagger/commit/5fd8ec1a39f568d67bd6644abe821729ba6a0725"><tt>5fd8ec1</tt></a>)</li>
</ul>bcorsotag:github.com,2008:Repository/7968417/dagger-2.532024-12-02T22:23:46ZDagger 2.53<h1>Potentially breaking changes:</h1>
<h3><code>@Binds</code> methods now requires explicit nullability</h3>
<p><strong>New:</strong> <code>@Binds</code> methods must explicitly declare nullability (previously we tried to infer it from<br>
the parameter). This change aligns the nullability behavior of <code>@Binds</code> with how nullability is<br>
treated elsewhere in Dagger by requiring it to be explict at the request and declaration sites.<br>
(<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/4941926c57958915b288423f28706a5496fee93c/hovercard" href="https://github.com/google/dagger/commit/4941926c57958915b288423f28706a5496fee93c"><tt>4941926</tt></a>)</p>
<p><strong>Suggested fix:</strong> If you get a failure due to this change, add the proper nullability to your <code>@Binds</code> method/parameter. For example:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Module
interface MyModule {
- @Binds fun bindToNullableImpl(impl: FooImpl): Foo
+ @Binds fun bindToNullableImpl(impl: FooImpl?): Foo?
}"><pre>@Module
interface MyModule {
<span class="pl-md"><span class="pl-md">-</span> @Binds fun bindToNullableImpl(impl: FooImpl): Foo</span>
<span class="pl-mi1"><span class="pl-mi1">+</span> @Binds fun bindToNullableImpl(impl: FooImpl?): Foo?</span>
}</pre></div>
<h3>Scopes are now banned on <code>@Binds</code> that delegate to production implementations.</h3>
<p><strong>New:</strong> Scoping an <code>@Binds</code> method that delegates to an <code>@Produces</code> implementation is not<br>
allowed. The scope was ignored anyway because production bindings are implicitly scoped. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/03b237ff2e37272ae65f8c116f9f395f0b44be1b/hovercard" href="https://github.com/google/dagger/commit/03b237ff2e37272ae65f8c116f9f395f0b44be1b"><tt>03b237f</tt></a>)</p>
<p><strong>Suggested fix:</strong> Remove the scope annotation (since the scope was ignored, this should not be a functional change).</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Module
interface MyModule {
- @ProductionScoped
@Binds fun bindToProductionImpl(impl: FooImpl): Foo
}"><pre>@Module
interface MyModule {
<span class="pl-md"><span class="pl-md">-</span> @ProductionScoped</span>
@Binds fun bindToProductionImpl(impl: FooImpl): Foo
}</pre></div>
<h3><code>@JvmSuppressWildcards</code> now required on multibound map requests in KSP.</h3>
<p><strong>New:</strong> When requesting a multibound map, users must include <code>@JvmSuppressWildcards</code> on the<br>
map's value, e.g. <code>Map<K, @JvmSuppressWildcards V></code>. Note that this has always been the behavior<br>
in KAPT, but due to a bug in the KSP implementation we accidentally matched the request without<br>
<code>@JvmSuppressWildcards</code>.</p>
<p><strong>Suggested fix:</strong> Unfortunately, this means users may need to add back <code>@JvmSuppressWildcards</code><br>
for multibound map requests. At the moment, KSP doesn't provide a way to determine the Kotlin type<br>
is actually assignable to <code>Map<K, V></code> without <code>@JvmSuppressWildcards</code> at compile time, and without<br>
this check users could hit runtime failures when Dagger tries to cast the type to the users type.</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class MyClass
@Inject constructor(
- multiboundMap: Map<K, V>
+ multiboundMap: Map<K, @JvmSuppressWildcards V>
)"><pre>class MyClass
@Inject constructor(
<span class="pl-md"><span class="pl-md">-</span> multiboundMap: Map<K, V></span>
<span class="pl-mi1"><span class="pl-mi1">+</span> multiboundMap: Map<K, @JvmSuppressWildcards V></span>
)</pre></div>
<p>In the future, we may consider simple cases where we can guarantee that <code>@JvmSuppressWildcards</code> can<br>
be elided, but that is out of scope for this release.</p>
<h3>Remove support for Java 7</h3>
<p><strong>New:</strong> Dagger has officially removed support for Java 7. Oracle ended support for Java 7 in<br>
July 2022, and since Dagger has upgraded to JDK 18, compiling with language level 7 is no longer<br>
supported. Note that this may not break users immediately since Dagger's generated code is still<br>
technically Java 7 compatible.</p>
<p><strong>Suggested Fix:</strong> Upgrade to Java 8+ (While Dagger can still test Java 8 at the moment, it is<br>
also deprecated as of January 2024, and we'll likely need to remove support soon).</p>
<h1>Other changes</h1>
<ul>
<li>Merge pull request <a href="https://github.com/google/dagger/pull/4459" data-hovercard-type="pull_request" data-hovercard-url="/google/dagger/pull/4459/hovercard">#4459</a>: Permit <code>@Multibinds</code> with values<br>
that are also allowed by <code>@IntoSet</code>/<code>@IntoMap</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/0f936b5ce8bd350d6c1dbf776b991849ff7a8225/hovercard" href="https://github.com/google/dagger/commit/0f936b5ce8bd350d6c1dbf776b991849ff7a8225"><tt>0f936b5</tt></a>)</li>
<li>Restrict multibindings from providing framework types that conflict with multibinding types<br>
Dagger provides (e.g. <code>@Provides @IntoMap Provider<String></code>). This is technically a breaking<br>
change but existing issues should either be for unused code or code that should have already<br>
broken anyway. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/15a30ca15b1ff36ca188a4f4721b8a563f1ef6cb/hovercard" href="https://github.com/google/dagger/commit/15a30ca15b1ff36ca188a4f4721b8a563f1ef6cb"><tt>15a30ca</tt></a>)</li>
<li>Remove the <code>ignorePrivateAndStaticInjectionForComponent</code> compiler option.<br>
This compiler option is only intended for internal testing of the tck tests, and should not be<br>
used by clients. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/dfcdc9ccb02987cae76f9027ed9735b8f9d1c3d2/hovercard" href="https://github.com/google/dagger/commit/dfcdc9ccb02987cae76f9027ed9735b8f9d1c3d2"><tt>dfcdc9c</tt></a>)</li>
<li>Upgrade Hilt Gradle Plugin min AGP version to 8.1 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/18d2b26ea2adf33a323610be5e828a7adf131a49/hovercard" href="https://github.com/google/dagger/commit/18d2b26ea2adf33a323610be5e828a7adf131a49"><tt>18d2b26</tt></a>)</li>
<li>Upgrade Kotlin Metadata dependency to 2.0.0-Beta5 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/9a94d1973fa42b56405c5cf0f80dcebd85e19580/hovercard" href="https://github.com/google/dagger/commit/9a94d1973fa42b56405c5cf0f80dcebd85e19580"><tt>9a94d19</tt></a>)</li>
<li>Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2463534109" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4391" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4391/hovercard" href="https://github.com/google/dagger/issues/4391">#4391</a>: Fix gwt issue (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/af62f2ddc33bb43e97ac593f1d0e5fad39c4ad15/hovercard" href="https://github.com/google/dagger/commit/af62f2ddc33bb43e97ac593f1d0e5fad39c4ad15"><tt>af62f2d</tt></a>)</li>
<li>Add GWT dependencies for Jakarta Inject (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/bea926cbc04ac7e5da00eaf1511889b0f2164dba/hovercard" href="https://github.com/google/dagger/commit/bea926cbc04ac7e5da00eaf1511889b0f2164dba"><tt>bea926c</tt></a>)</li>
</ul>bcorsotag:github.com,2008:Repository/7968417/dagger-2.522024-08-05T18:40:23ZDagger 2.52<p>Dagger 2.52</p>
<p>Notes:<br>
Dagger KSP now requires at least KSP 1.9.24-1.0.20.</p>
<h1>Bug fixes</h1>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2281451270" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4302" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4302/hovercard" href="https://github.com/google/dagger/issues/4302">#4302</a>: Suppress deprecation warnings in generated code. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/f41033cc448eb7bdb83af2356c8802f1208d1824/hovercard" href="https://github.com/google/dagger/commit/f41033cc448eb7bdb83af2356c8802f1208d1824"><tt>f41033c</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2338605661" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4323" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4323/hovercard" href="https://github.com/google/dagger/issues/4323">#4323</a>: Added rules to stop LazyClassKey referenced classes being merged with R8 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/81512af9ee6465c992ffb81464978be15f5d76e7/hovercard" href="https://github.com/google/dagger/commit/81512af9ee6465c992ffb81464978be15f5d76e7"><tt>81512af</tt></a>).</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2390020955" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4345" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4345/hovercard" href="https://github.com/google/dagger/issues/4345">#4345</a>: Fixes intersection type bounds order in generated factories when using KSP (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/3164197" rel="nofollow">aosp/3164197</a>).</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2404479771" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4352" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4352/hovercard" href="https://github.com/google/dagger/issues/4352">#4352</a>: Fixes an issue where the parameter name "instance" could conflict with fields of the same name in the component. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/952c2504ae4ddd4f1fa7939ac101b27dd17f0b6c/hovercard" href="https://github.com/google/dagger/commit/952c2504ae4ddd4f1fa7939ac101b27dd17f0b6c"><tt>952c250</tt></a>)</li>
<li>Merged pull request <a href="https://github.com/google/dagger/pull/4305" data-hovercard-type="pull_request" data-hovercard-url="/google/dagger/pull/4305/hovercard">#4305</a>: Skip view injection when in edit mode for previews. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/65b74f832c6323195bd1a20a3af56ca30fa9c5e0/hovercard" href="https://github.com/google/dagger/commit/65b74f832c6323195bd1a20a3af56ca30fa9c5e0"><tt>65b74f8</tt></a>)</li>
<li>Fixed an issue where base classes with a package private constructor would cause the generated code to fail (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/db25237df0f59943e47b89486383a7d7a5605b3c/hovercard" href="https://github.com/google/dagger/commit/db25237df0f59943e47b89486383a7d7a5605b3c"><tt>db25237</tt></a>)</li>
<li>Add a jakarta.inject.Provider runtime dependency in preparation for supporting Jakarta Providers (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/a8581e0a62b7cb3d1f5a13da26a8f40e22aad3d0/hovercard" href="https://github.com/google/dagger/commit/a8581e0a62b7cb3d1f5a13da26a8f40e22aad3d0"><tt>a8581e0</tt></a>)</li>
</ul>bcorsotag:github.com,2008:Repository/7968417/dagger-2.51.12024-03-29T18:57:08ZDagger 2.51.1<h1>New Dagger Features</h1>
<ul>
<li>Added <code>BindingGraphPlugin#onProcessingRoundBegin</code> for pre-processing initialization. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/2a6a0b46160eb484892195f0e832a26e18fbff88/hovercard" href="https://github.com/google/dagger/commit/2a6a0b46160eb484892195f0e832a26e18fbff88"><tt>2a6a0b4</tt></a>)</li>
</ul>
<h1>Dagger bug fixes</h1>
<p>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2030026227" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4181" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4181/hovercard" href="https://github.com/google/dagger/issues/4181">#4181</a>: Associate Dagger Android output with the generated Component, so that incremental builds with Ksp won’t fail.<br>
Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2163375536" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4254" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4254/hovercard" href="https://github.com/google/dagger/issues/4254">#4254</a>: Support using scoped <code>@LazyClassKey</code> map bindings.<br>
Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2183402204" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4262" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4262/hovercard" href="https://github.com/google/dagger/issues/4262">#4262</a>: Support referencing an array of annotations in a map key annotation.</p>wanyingd1996tag:github.com,2008:Repository/7968417/dagger-2.512024-02-28T22:08:12ZDagger 2.51<h1>New Dagger Features</h1>
<ul>
<li>Added a <code>@LazyClassKey</code> annotation that supports using class names as a map key. Unlike the existing <code>@ClassKey</code>, the map generated by <code>@LazyClassKey</code> won’t eagerly load all of the classes for the keys. This can be useful in situations or environments where classloading can be expensive, such as on Android. For more information, see <a href="https://dagger.dev/dev-guide/multibindings" rel="nofollow">https://dagger.dev/dev-guide/multibindings</a></li>
</ul>
<h1>Potential breaking changes</h1>
<ul>
<li>Protected fields using <code>@Inject</code> are now banned in Kotlin classes. This is because Kotlin protected fields are not accessible by code in the same package, unlike Java. This has been working up to this point because Dagger generates Java code, but that is unintentional and would break if Dagger switched to generate Kotlin code.(<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/408431a3bb4db983f27bb96122167ca4cf41322e/hovercard" href="https://github.com/google/dagger/commit/408431a3bb4db983f27bb96122167ca4cf41322e"><tt>408431a</tt></a>)</li>
</ul>
<h1>New Hilt Features</h1>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1117405328" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/3197" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/3197/hovercard" href="https://github.com/google/dagger/issues/3197">#3197</a>: Used the new <code>@LazyClassKey</code> Dagger feature to remove the keep rule for <code>@HiltViewModel</code> class names. This allows obfuscation of <code>@HiltViewModel</code> annotated ViewModel class names with R8. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/0786d0af598028098849cb88a16b72549f238dcc/hovercard" href="https://github.com/google/dagger/commit/0786d0af598028098849cb88a16b72549f238dcc"><tt>0786d0a</tt></a>)</li>
<li>Added <code>@SkipTestInjection</code> which can be used for skipping test injection in Hilt Android tests, which may be useful if building separate custom test infrastructure to inject the test class from another Hilt component. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/c40811e71012c0838b83c3dd6b921f42332f2831/hovercard" href="https://github.com/google/dagger/commit/c40811e71012c0838b83c3dd6b921f42332f2831"><tt>c40811e</tt></a>)</li>
</ul>
<h1>Dagger bug fixes</h1>
<ul>
<li>Improve Dagger MissingBinding error messages to give more information and be more consistent. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/c8722386a1fb10d9e70c6fbccba01ebdd5e56967/hovercard" href="https://github.com/google/dagger/commit/c8722386a1fb10d9e70c6fbccba01ebdd5e56967"><tt>c872238</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2061055356" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4201" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4201/hovercard" href="https://github.com/google/dagger/issues/4201">#4201</a>: Suppress warning for casting in Dagger generated code. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/813ffced8ae5f5b1bc7cc381778d1c1dce7129c7/hovercard" href="https://github.com/google/dagger/commit/813ffced8ae5f5b1bc7cc381778d1c1dce7129c7"><tt>813ffce</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2062955373" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4203" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4203/hovercard" href="https://github.com/google/dagger/issues/4203">#4203</a>: Removes <code>@Deprecated</code> annotation causing warnings (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/3cbc94ad3ff46c5ec5865f4fbc9952f39f7cfa4d/hovercard" href="https://github.com/google/dagger/commit/3cbc94ad3ff46c5ec5865f4fbc9952f39f7cfa4d"><tt>3cbc94a</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2055452651" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4199" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4199/hovercard" href="https://github.com/google/dagger/issues/4199">#4199</a>: Support member injections from type aliased superclass (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/662d823597f8695c0e7af94a9eb3cdd5c1b7298e/hovercard" href="https://github.com/google/dagger/commit/662d823597f8695c0e7af94a9eb3cdd5c1b7298e"><tt>662d823</tt></a>)</li>
<li>Complete Ksp support for Dagger Android: Added a Ksp Processor for Dagger Android ProguardProcessor that was previously missed. The ProguardProcessor is a Dagger Android implementation detail that makes sure the AndroidInjector works correctly when shrinking tools obfuscate <code>@ContributesAndroidInjector</code> annotated injector class names. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/e71de27a1d57165f8b3f05d68655d21a093743ff/hovercard" href="https://github.com/google/dagger/commit/e71de27a1d57165f8b3f05d68655d21a093743ff"><tt>e71de27</tt></a>)</li>
</ul>wanyingd1996tag:github.com,2008:Repository/7968417/dagger-2.502023-12-19T23:57:30ZDagger 2.50<h1>Dagger</h1>
<h2>Potential breaking changes</h2>
<ul>
<li>Introduced a new <code>dagger.internal.Provider</code> to facilitate future support for <code>jakarta.inject.Provider</code> types. There should be no visible changes at this time, though with such a large change there is a risk of unanticipated version compatibility issues across libraries built with different Dagger versions. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/75d3cbcf95f1b540faac46f87bc8d018e254bd4e/hovercard" href="https://github.com/google/dagger/commit/75d3cbcf95f1b540faac46f87bc8d018e254bd4e"><tt>75d3cbc</tt></a>)</li>
<li>Flip the default for <code>-Adagger.explicitBindingConflictsWithInject</code> to enabled. This flag fixes a bug where an explicit binding like an <code>@Provides</code> should conflict with <code>@Inject</code> bindings if the <code>@Inject</code> is actually used in a parent component. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/8372c630821d298dc6c4f237d38e216ae3bdfb73/hovercard" href="https://github.com/google/dagger/commit/8372c630821d298dc6c4f237d38e216ae3bdfb73"><tt>8372c63</tt></a>)</li>
</ul>
<h2>Bug fixes</h2>
<ul>
<li>Fixed the error message for an <code>@Binds @IntoSet</code> implementation with duplicate bindings. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/8d0122322b912c1d9b6d4605e9126ba450abf7d6/hovercard" href="https://github.com/google/dagger/commit/8d0122322b912c1d9b6d4605e9126ba450abf7d6"><tt>8d01223</tt></a>)</li>
</ul>Chang-Erictag:github.com,2008:Repository/7968417/dagger-2.492023-12-01T21:04:16ZDagger 2.49<h1>Dagger</h1>
<h3>New features:</h3>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1874349506" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4044" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4044/hovercard" href="https://github.com/google/dagger/issues/4044">#4044</a>: Add support for KSP with <code>dagger.android</code> (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/83271776751d7aa4fe8683984682b0016b08bf5e/hovercard" href="https://github.com/google/dagger/commit/83271776751d7aa4fe8683984682b0016b08bf5e"><tt>8327177</tt></a>).</li>
</ul>
<h3>Potential breaking changes:</h3>
<ul>
<li>
<p>Dagger’s generated component no longer contains deprecated no-op module setter methods for modules that have only <code>static</code>/<code>abstract</code> <code>@Provides</code>/<code>@Binds</code> methods (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/ed47d4b88fe970c146e7ed1a7d6e59e1ba8ef97f/hovercard" href="https://github.com/google/dagger/commit/ed47d4b88fe970c146e7ed1a7d6e59e1ba8ef97f"><tt>ed47d4b</tt></a>).</p>
<p><strong>Note:</strong> If you hit this issue, the fix is to remove the call to the setter method in your code. For example:</p>
<div class="highlight highlight-source-diff notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MyComponent component =
DaggerMyComponent.builder()
- .moduleWithOnlyStaticOrAbstractMethods(new ModuleWithOnlyStaticOrAbstractMethods())
.build();"><pre>MyComponent component =
DaggerMyComponent.builder()
<span class="pl-md"><span class="pl-md">-</span> .moduleWithOnlyStaticOrAbstractMethods(new ModuleWithOnlyStaticOrAbstractMethods())</span>
.build();</pre></div>
<p>These setter methods were already no-ops (i.e. Dagger just ignored them), so removing it should not cause any functional changes.</p>
</li>
</ul>
<h3>Bug fixes:</h3>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1874872844" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4046" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4046/hovercard" href="https://github.com/google/dagger/issues/4046">#4046</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1988796528" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4140" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4140/hovercard" href="https://github.com/google/dagger/issues/4140">#4140</a>: Fixes <code>Unexpected element</code> error in when calculating nullability (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/4593c0acd3c18564689edfc93c2fde7408275d4f/hovercard" href="https://github.com/google/dagger/commit/4593c0acd3c18564689edfc93c2fde7408275d4f"><tt>4593c0a</tt></a>)</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1940732877" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4096" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4096/hovercard" href="https://github.com/google/dagger/issues/4096">#4096</a>: Fix type names for inline types on the KSP side (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/2789273" rel="nofollow">aosp/2789273</a>)</li>
<li>Build-time performance improvements (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/85e9ff10ea07836dcae76669330440a8041aa9c8/hovercard" href="https://github.com/google/dagger/commit/85e9ff10ea07836dcae76669330440a8041aa9c8"><tt>85e9ff1</tt></a>) and (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/d9d0a8ee6c6ea69dfa516acfac5e04ac232c3498/hovercard" href="https://github.com/google/dagger/commit/d9d0a8ee6c6ea69dfa516acfac5e04ac232c3498"><tt>d9d0a8e</tt></a>).</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1886558526" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4060" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4060/hovercard" href="https://github.com/google/dagger/issues/4060">#4060</a>: Updated KSP to <code>1.9.20-1.0.14</code> which should contain the fix for a number of incremental processing issues related to KSP (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/692015f3c9008c5972d59a976eb65f016023159b/hovercard" href="https://github.com/google/dagger/commit/692015f3c9008c5972d59a976eb65f016023159b"><tt>692015f</tt></a>).</li>
</ul>
<h1>Hilt</h1>
<h3>New features:</h3>
<ul>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="787699239" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/2287" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/2287/hovercard" href="https://github.com/google/dagger/issues/2287">#2287</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1335641955" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/3523" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/3523/hovercard" href="https://github.com/google/dagger/issues/3523">#3523</a>: Add support for using <code>@AssistedInject</code> with <code>@HiltViewModel</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/83271776751d7aa4fe8683984682b0016b08bf5e/hovercard" href="https://github.com/google/dagger/commit/83271776751d7aa4fe8683984682b0016b08bf5e"><tt>8327177</tt></a>).<br>
For more details visit <a href="https://dagger.dev/hilt/view-model#assisted-injection" rel="nofollow">https://dagger.dev/hilt/view-model#assisted-injection</a>.</li>
<li>Hilt now provides <code>@ActivityRetainedSavedState SavedStateHandle</code> from <code>ActivityRetainedComponent</code> (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/1cac33b1d2f9061c8dfea899662dbcdc1f727f24/hovercard" href="https://github.com/google/dagger/commit/1cac33b1d2f9061c8dfea899662dbcdc1f727f24"><tt>1cac33b</tt></a>).<br>
<strong>Note:</strong> This feature relies on a somewhat experimental implementation in order to provide this binding lazily while also avoiding leaking the activity. The laziness is a requirement to not restrict activity injection and also to avoid bloating the saved state when unused. While we predict this should be safe to rely on, if issues are discovered with this implementation, it is possible that a future release may have to remove this binding.</li>
</ul>
<h3>Bug fixes:</h3>
<ul>
<li>Fixed <a href="https://issuetracker.google.com/307592550" rel="nofollow">b/307592550</a>: Fixes <code>FileNotFoundException</code> in AGP 8.3 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/6018cd2620d61a72a2473b2ef3d228003e587ffd/hovercard" href="https://github.com/google/dagger/commit/6018cd2620d61a72a2473b2ef3d228003e587ffd"><tt>6018cd2</tt></a>) and (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/f946e34409bb142c3f547d708d29928b1589510f/hovercard" href="https://github.com/google/dagger/commit/f946e34409bb142c3f547d708d29928b1589510f"><tt>f946e34</tt></a>).</li>
<li>Fixed <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1977243237" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4130" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4130/hovercard" href="https://github.com/google/dagger/issues/4130">#4130</a>: Fix HiltGradlePlugin not working in KMP's androidMain directory (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/f0c2510da4109a098eb05bb7e464eb1df1c92c9c/hovercard" href="https://github.com/google/dagger/commit/f0c2510da4109a098eb05bb7e464eb1df1c92c9c"><tt>f0c2510</tt></a>).</li>
</ul>bcorsotag:github.com,2008:Repository/7968417/dagger-2.48.12023-10-03T22:15:24ZDagger 2.48.1<h2>Bug Fixes</h2>
<p>Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1888097591" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4063" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4063/hovercard" href="https://github.com/google/dagger/issues/4063">#4063</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1876856576" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4054" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4054/hovercard" href="https://github.com/google/dagger/issues/4054">#4054</a>: [KSP]: Fixes some incremental processing issues with KSP (c8a568956)<br>
Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1874872844" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4046" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4046/hovercard" href="https://github.com/google/dagger/issues/4046">#4046</a>: [KSP] Fixes "Unexpected element" in XProcessing library (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/androidx/androidx/commit/bdc1bb06d4f5dbd574bb66cef674ba31846eb4d3/hovercard" href="https://github.com/androidx/androidx/commit/bdc1bb06d4f5dbd574bb66cef674ba31846eb4d3">androidx/androidx@<tt>bdc1bb0</tt></a>)<br>
Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1880489329" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4059" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4059/hovercard" href="https://github.com/google/dagger/issues/4059">#4059</a>: [KSP] Align behavior of generic inline types in KSP with KAPT in XProcessing library (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/androidx/androidx/commit/b0fa9cf493458a1f3b35a1d68298552e3eaae678/hovercard" href="https://github.com/androidx/androidx/commit/b0fa9cf493458a1f3b35a1d68298552e3eaae678">androidx/androidx@<tt>b0fa9cf</tt></a>)<br>
Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1822607835" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/3980" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/3980/hovercard" href="https://github.com/google/dagger/issues/3980">#3980</a>: Fixes Lint crash with AGP 8.1.0. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/e651294c2e68e7e5ca0e87e43d6d369b012ad2a6/hovercard" href="https://github.com/google/dagger/commit/e651294c2e68e7e5ca0e87e43d6d369b012ad2a6"><tt>e651294</tt></a>)<br>
Fixes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1877874269" data-permission-text="Title is private" data-url="https://github.com/google/dagger/issues/4055" data-hovercard-type="issue" data-hovercard-url="/google/dagger/issues/4055/hovercard" href="https://github.com/google/dagger/issues/4055">#4055</a>: Fixes issue with using generic types in Dagger's ClassKey (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/dagger/commit/9852b423712b07efc6317067bfb8a1a79cebb230/hovercard" href="https://github.com/google/dagger/commit/9852b423712b07efc6317067bfb8a1a79cebb230"><tt>9852b42</tt></a>)</p>bcorso