tag:github.com,2008:https://github.com/google/auto/releases Release notes from auto 2025-11-11T20:22:10Z tag:github.com,2008:Repository/10230369/auto-value-1.11.1 2025-11-11T20:49:55Z AutoValue 1.11.1 <ul> <li>Fixed a crash with <code>@AutoValue.CopyAnnotations(exclude=Missing.class)</code>, where <code>Missing</code> is a class that does not exist.</li> <li>Type-use annotations such as <code>@Nullable</code> are now better preserved in generated builder setter method parameters. Previously they could be lost in some circumstances, for example with <code>@Nullable T</code>.</li> <li>An issue with <code>@Nullable</code> type-use annotations in AutoBuilder has been fixed.</li> <li>Report a diagnostic for setters with boxed primitive types for primitive properties.</li> <li>A bug with AutoBuilder and Kotlin data classes has been fixed. If there was a mix of required and optional parameters in a data class with a large number of properties, sometimes the generated code would not compile.</li> </ul> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-value-1.11.0 2024-05-31T19:46:21Z AutoValue 1.11.0 <h2>What's Changed</h2> <ul> <li>AutoValue (including AutoBuilder) no longer bundles the Kotlin metadata API. This may require adding an explicit dependency on <code>org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.9.0</code> or <code>org.jetbrains.kotlin:kotlin-metadata-jvm:2.0.0</code> to client code that uses AutoBuilder to build Kotlin classes. The metadata API has changed from <code>kotlinx.metadata</code> to <code>kotlin.metadata</code>, but AutoBuilder uses reflection to function with either. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/260b61ec7bac0bcbc0b6af571bf80b8ee45119bd/hovercard" href="https://github.com/google/auto/commit/260b61ec7bac0bcbc0b6af571bf80b8ee45119bd"><tt>260b61e</tt></a>)</li> <li>Support for generating Java 7 code has been removed from AutoValue, AutoAnnotation, and AutoBuilder. You must be on at least Java 8, or an Android version with desugaring that allows it to pass for Java 8. 1.10.4 is the last AutoValue version with support for Java 7. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/b9142b7cd872ccac3794470af17a9df594e9013f/hovercard" href="https://github.com/google/auto/commit/b9142b7cd872ccac3794470af17a9df594e9013f"><tt>b9142b7</tt></a>)</li> <li>AutoBuilder now reports an error if it encounters a <code>@Nullable</code> primitive parameter. Primitive types cannot be <code>null</code>, and should not be annotated for nullness. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/7cbdeb43b6120b5c8fb2ab9802bc0e0cb8d5efac/hovercard" href="https://github.com/google/auto/commit/7cbdeb43b6120b5c8fb2ab9802bc0e0cb8d5efac"><tt>7cbdeb4</tt></a>)</li> <li>Annotations on type parameters, like <code>abstract @Nullable T foo()</code>, are now better propagated to fields and constructor parameters. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/92d881ed9e031021ea01c43b168048468ebd324e/hovercard" href="https://github.com/google/auto/commit/92d881ed9e031021ea01c43b168048468ebd324e"><tt>92d881e</tt></a>)</li> <li>The generated <code>toBuilder()</code> method now says <code>new AutoValue_Foo.Builder(this)</code> rather than just <code>new Builder(this)</code>, to do the right thing if an extension generates its own subclass of <code>Builder</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/324470ba28e85482c7b359a3679601583323d9ab/hovercard" href="https://github.com/google/auto/commit/324470ba28e85482c7b359a3679601583323d9ab"><tt>324470b</tt></a>)</li> <li>The "copy constructor" in a generated <code>Builder</code> is no longer private. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/6730615c9a319f9ae0e108144e79a1d26bb473d2/hovercard" href="https://github.com/google/auto/commit/6730615c9a319f9ae0e108144e79a1d26bb473d2"><tt>6730615</tt></a>)</li> <li>Added support for extending AutoValue.Builder with abstract methods. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/7d4b020dd8d8b74d0eba417e7b528b2b0ed3aae7/hovercard" href="https://github.com/google/auto/commit/7d4b020dd8d8b74d0eba417e7b528b2b0ed3aae7"><tt>7d4b020</tt></a>)</li> <li>The annotation processors now support all kinds of resource URLs when loading template resources. This change only affects the case where the AutoValue (etc) processors are being invoked in an unusual environment, for example from a GraalVM app. It does not affect code that is merely being compiled for such an environment. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/80b0ada7543515d9b8f923a42b42f750eccaf92b/hovercard" href="https://github.com/google/auto/commit/80b0ada7543515d9b8f923a42b42f750eccaf92b"><tt>80b0ada</tt></a>)</li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/google/auto/compare/auto-value-1.10.4...auto-value-1.11.0"><tt>auto-value-1.10.4...auto-value-1.11.0</tt></a></p> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-factory-1.1.0 2023-11-20T23:18:11Z AutoFactory 1.1.0 <ul> <li>AutoFactory now recognizes and generates both <code>javax.inject</code> and <code>jakarta.inject</code>. If <code>jakarta.inject</code> is on the classpath then it will be used, and otherwise <code>javax.inject</code>. A new compiler option <code>-Acom.google.auto.factory.InjectApi</code> can be set to either <code>javax</code> or <code>jakarta</code> to force the use of one or the other. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/67772b26d0493bd1bb2bfb546d0ffd6e4affd0f5/hovercard" href="https://github.com/google/auto/commit/67772b26d0493bd1bb2bfb546d0ffd6e4affd0f5"><tt>67772b2</tt></a>)</li> <li>There is now a way to add annotations to generated AutoFactory classes. See the javadoc for <code>@AutoFactory.AnnotationsToApply</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/b2a1c08859fe4974ffcdad85623afd28d41b5d43/hovercard" href="https://github.com/google/auto/commit/b2a1c08859fe4974ffcdad85623afd28d41b5d43"><tt>b2a1c08</tt></a>)</li> <li>The exception message for a null value now indicates not only which number argument it is but also how many arguments there are in total. This may lead to a small increase in code size. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/ab6c7bfb6bc99a700115395d49f26f789dbc54a4/hovercard" href="https://github.com/google/auto/commit/ab6c7bfb6bc99a700115395d49f26f789dbc54a4"><tt>ab6c7bf</tt></a>)</li> <li>AutoFactory now correctly handles the case where a parameter annotation has <code>@Target</code> with both <code>PARAMETER</code> and <code>TYPE_USE</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/9d455fa17316c762051c7b1afc27f12adae6c738/hovercard" href="https://github.com/google/auto/commit/9d455fa17316c762051c7b1afc27f12adae6c738"><tt>9d455fa</tt></a>)</li> <li>When a requested supertype of the generated factory class has a type parameter, the generated class now always has the same parameter. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/206b67396601d99fe87580e7b76d65d3035cc8e3/hovercard" href="https://github.com/google/auto/commit/206b67396601d99fe87580e7b76d65d3035cc8e3"><tt>206b673</tt></a>)</li> <li>Better error message when detecting duplicate parameters (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/59ec5e659f08b11b2adfc297bb99a555ca27aa46/hovercard" href="https://github.com/google/auto/commit/59ec5e659f08b11b2adfc297bb99a555ca27aa46"><tt>59ec5e6</tt></a>)</li> </ul> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-value-1.10.4 2023-09-08T23:40:19Z AutoValue 1.10.4 <ul> <li>A workaround for a JDK bug with reading jar resources has been extended so it always applies, rather than just as a fallback. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1834226183" data-permission-text="Title is private" data-url="https://github.com/google/auto/issues/1572" data-hovercard-type="issue" data-hovercard-url="/google/auto/issues/1572/hovercard" href="https://github.com/google/auto/issues/1572">#1572</a>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/3f69cd2551a72828ef772a22d31e23e061dd0e79/hovercard" href="https://github.com/google/auto/commit/3f69cd2551a72828ef772a22d31e23e061dd0e79"><tt>3f69cd2</tt></a>)</li> <li>If an AutoValue property method is <code>@Nullable</code>, the corresponding field in the generated class will be too. This was already the case for <code>TYPE_USE</code> <code>@Nullable</code> or if the method had <code>@CopyAnnotations</code>, but now <code>@Nullable</code> will be copied in other cases too. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/4506804f1cc40e565eaf79e42c7ef3e6a23f0890/hovercard" href="https://github.com/google/auto/commit/4506804f1cc40e565eaf79e42c7ef3e6a23f0890"><tt>4506804</tt></a>)</li> </ul> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-value-1.10.3 2023-08-15T20:31:15Z AutoValue 1.10.3 <ul> <li>An "incompatible version" issue with Kotlin compilation has been fixed. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1849568211" data-permission-text="Title is private" data-url="https://github.com/google/auto/issues/1574" data-hovercard-type="issue" data-hovercard-url="/google/auto/issues/1574/hovercard" href="https://github.com/google/auto/issues/1574">#1574</a>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/b21c7f4fb103c71289cddba22e5aeada81cd748f/hovercard" href="https://github.com/google/auto/commit/b21c7f4fb103c71289cddba22e5aeada81cd748f"><tt>b21c7f4</tt></a>)</li> <li>A warning is now produced if a <code>setX</code> method in a <code>Builder</code> or its return type is marked <code>@Nullable</code>. Those methods always return the <code>Builder</code> instance, which is never null. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/e5b4b548486549ba096983d6d79ed39f9a0e16b7/hovercard" href="https://github.com/google/auto/commit/e5b4b548486549ba096983d6d79ed39f9a0e16b7"><tt>e5b4b54</tt></a>)</li> </ul> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-value-1.10.2 2023-06-28T17:32:29Z AutoValue 1.10.2 <ul> <li>The constructor parameter names in the class generated by <code>@Memoized</code> no longer add a <code>$</code>. <strong>This may require changes</strong> to code that was depending on the old names, for example using Error Prone's <code>/* param= */</code> comments. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/4f8dbea8a7ab3b6718b45be5fda6f67e84bf0003/hovercard" href="https://github.com/google/auto/commit/4f8dbea8a7ab3b6718b45be5fda6f67e84bf0003"><tt>4f8dbea</tt></a>)</li> <li>An AutoValue or AutoBuilder property is now allowed to be null if its type is a type variable with a <code>@Nullable</code> bound, like <code>&lt;T extends @Nullable Object&gt;</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/1b58cff5e42a68260527a207b5f63626abbb0a87/hovercard" href="https://github.com/google/auto/commit/1b58cff5e42a68260527a207b5f63626abbb0a87"><tt>1b58cff</tt></a>)</li> <li>Better error message when AutoValue, AutoBuilder, etc give up because of missing types. We now say what the first missing type was. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/2e734f605a47e385385525cf3e115069d972f2aa/hovercard" href="https://github.com/google/auto/commit/2e734f605a47e385385525cf3e115069d972f2aa"><tt>2e734f6</tt></a>)</li> <li>AutoBuilder copy-constructors no longer require an exact match between a property and the corresponding constructor parameter. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/1440a25e4365b81255df3c6a48827d9e17b79540/hovercard" href="https://github.com/google/auto/commit/1440a25e4365b81255df3c6a48827d9e17b79540"><tt>1440a25</tt></a>)</li> <li>A property of type <code>List&lt;T&gt;</code> can be built by a property builder whose <code>build()</code> method returns <code>List&lt;? extends T&gt;</code>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/8ba4531b8d26afc74a54c681f546787dc670a0c2/hovercard" href="https://github.com/google/auto/commit/8ba4531b8d26afc74a54c681f546787dc670a0c2"><tt>8ba4531</tt></a>)</li> <li>Made it easier to support <code>@CopyAnnotations</code> in AutoValue extensions, via new methods <a href="https://javadoc.io/static/com.google.auto.value/auto-value/1.10.2/com/google/auto/value/extension/AutoValueExtension.Context.html#classAnnotationsToCopy(javax.lang.model.element.TypeElement)" rel="nofollow"><code>classAnnotationsToCopy</code></a> and <a href="https://javadoc.io/static/com.google.auto.value/auto-value/1.10.2/com/google/auto/value/extension/AutoValueExtension.Context.html#methodAnnotationsToCopy(javax.lang.model.element.ExecutableElement)" rel="nofollow"><code>methodAnnotationsToCopy</code></a>. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/a3f218d2b848f1f56958e8b7134a574008f2fa4a/hovercard" href="https://github.com/google/auto/commit/a3f218d2b848f1f56958e8b7134a574008f2fa4a"><tt>a3f218d</tt></a>)</li> <li>Generated builders now include a <code>@Nullable</code> type annotation on appropriate builder fields if one is available. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/91d5f32c6a749fde31085b99387028726321c2ee/hovercard" href="https://github.com/google/auto/commit/91d5f32c6a749fde31085b99387028726321c2ee"><tt>91d5f32</tt></a>)</li> <li>Updated <code>@AutoAnnotation</code> documentation to say that it isn't needed in Kotlin. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/600b4b6d081ece887500859d6c2d405edad9ae32/hovercard" href="https://github.com/google/auto/commit/600b4b6d081ece887500859d6c2d405edad9ae32"><tt>600b4b6</tt></a>)</li> <li>Maven dependencies have been updated, fixing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1741262984" data-permission-text="Title is private" data-url="https://github.com/google/auto/issues/1532" data-hovercard-type="issue" data-hovercard-url="/google/auto/issues/1532/hovercard" href="https://github.com/google/auto/issues/1532">#1532</a>.</li> </ul> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-service-1.1.1 2023-06-12T16:36:17Z auto-service-1.1.1 <h2>What's Changed</h2> <ul> <li>No functional changes.</li> <li>Dependencies updated.</li> <li>Some minor code improvements.</li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/google/auto/compare/auto-service-1.1.0...auto-service-1.1.1"><tt>auto-service-1.1.0...auto-service-1.1.1</tt></a></p> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-common-1.2.2 2023-06-12T16:39:19Z auto-common-1.2.2 <h2>What's Changed</h2> <ul> <li>No functional changes.</li> <li>Dependencies updated.</li> </ul> <p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/google/auto/compare/auto-common-1.2.1...auto-common-1.2.2"><tt>auto-common-1.2.1...auto-common-1.2.2</tt></a></p> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-service-1.1.0 2023-05-23T17:32:29Z AutoService 1.1.0 <ul> <li>AutoService now verifies by default that the annotated class does indeed implement the interface in <code>@AutoServce</code>. Previously this only happened when compiling with <code>-Averify=true</code>. The verification can be disabled either by compiling with <code>-Averify=false</code> or by adding <code>@SuppressWarnings("AutoService")</code> to the annotated class. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/965e8932814ba79804ff8977ad346837df8c9c35/hovercard" href="https://github.com/google/auto/commit/965e8932814ba79804ff8977ad346837df8c9c35"><tt>965e893</tt></a>)</li> <li>The <code>@AutoService</code> annotation can no longer be applied to an interface or abstract class. This new verification can also be disabled in the same way. (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/google/auto/commit/591731c32a6b425a43023335fb062c247fd65e63/hovercard" href="https://github.com/google/auto/commit/591731c32a6b425a43023335fb062c247fd65e63"><tt>591731c</tt></a>)</li> </ul> eamonnmcmanus tag:github.com,2008:Repository/10230369/auto-service-1.0.2 2023-05-23T16:59:21Z AutoService 1.0.2 <p>Updating Maven dependencies only. No functional changes.</p> eamonnmcmanus