Releases: google/auto
Releases Β· google/auto
AutoValue 1.11.1
- Fixed a crash with
@AutoValue.CopyAnnotations(exclude=Missing.class), whereMissingis a class that does not exist. - Type-use annotations such as
@Nullableare now better preserved in generated builder setter method parameters. Previously they could be lost in some circumstances, for example with@Nullable T. - An issue with
@Nullabletype-use annotations in AutoBuilder has been fixed. - Report a diagnostic for setters with boxed primitive types for primitive properties.
- 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.
AutoValue 1.11.0
What's Changed
- AutoValue (including AutoBuilder) no longer bundles the Kotlin metadata API. This may require adding an explicit dependency on
org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.9.0ororg.jetbrains.kotlin:kotlin-metadata-jvm:2.0.0to client code that uses AutoBuilder to build Kotlin classes. The metadata API has changed fromkotlinx.metadatatokotlin.metadata, but AutoBuilder uses reflection to function with either. (260b61e) - 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. (b9142b7)
- AutoBuilder now reports an error if it encounters a
@Nullableprimitive parameter. Primitive types cannot benull, and should not be annotated for nullness. (7cbdeb4) - Annotations on type parameters, like
abstract @Nullable T foo(), are now better propagated to fields and constructor parameters. (92d881e) - The generated
toBuilder()method now saysnew AutoValue_Foo.Builder(this)rather than justnew Builder(this), to do the right thing if an extension generates its own subclass ofBuilder. (324470b) - The "copy constructor" in a generated
Builderis no longer private. (6730615) - Added support for extending AutoValue.Builder with abstract methods. (7d4b020)
- 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. (80b0ada)
Full Changelog: auto-value-1.10.4...auto-value-1.11.0
AutoFactory 1.1.0
- AutoFactory now recognizes and generates both
javax.injectandjakarta.inject. Ifjakarta.injectis on the classpath then it will be used, and otherwisejavax.inject. A new compiler option-Acom.google.auto.factory.InjectApican be set to eitherjavaxorjakartato force the use of one or the other. (67772b2) - There is now a way to add annotations to generated AutoFactory classes. See the javadoc for
@AutoFactory.AnnotationsToApply. (b2a1c08) - 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. (ab6c7bf)
- AutoFactory now correctly handles the case where a parameter annotation has
@Targetwith bothPARAMETERandTYPE_USE. (9d455fa) - When a requested supertype of the generated factory class has a type parameter, the generated class now always has the same parameter. (206b673)
- Better error message when detecting duplicate parameters (59ec5e6)
AutoValue 1.10.4
- A workaround for a JDK bug with reading jar resources has been extended so it always applies, rather than just as a fallback. See #1572. (3f69cd2)
- If an AutoValue property method is
@Nullable, the corresponding field in the generated class will be too. This was already the case forTYPE_USE@Nullableor if the method had@CopyAnnotations, but now@Nullablewill be copied in other cases too. (4506804)
AutoValue 1.10.3
AutoValue 1.10.2
- The constructor parameter names in the class generated by
@Memoizedno longer add a$. This may require changes to code that was depending on the old names, for example using Error Prone's/* param= */comments. (4f8dbea) - An AutoValue or AutoBuilder property is now allowed to be null if its type is a type variable with a
@Nullablebound, like<T extends @Nullable Object>. (1b58cff) - Better error message when AutoValue, AutoBuilder, etc give up because of missing types. We now say what the first missing type was. (2e734f6)
- AutoBuilder copy-constructors no longer require an exact match between a property and the corresponding constructor parameter. (1440a25)
- A property of type
List<T>can be built by a property builder whosebuild()method returnsList<? extends T>. (8ba4531) - Made it easier to support
@CopyAnnotationsin AutoValue extensions, via new methodsclassAnnotationsToCopyandmethodAnnotationsToCopy. (a3f218d) - Generated builders now include a
@Nullabletype annotation on appropriate builder fields if one is available. (91d5f32) - Updated
@AutoAnnotationdocumentation to say that it isn't needed in Kotlin. (600b4b6) - Maven dependencies have been updated, fixing #1532.
auto-service-1.1.1
What's Changed
- No functional changes.
- Dependencies updated.
- Some minor code improvements.
Full Changelog: auto-service-1.1.0...auto-service-1.1.1
auto-common-1.2.2
What's Changed
- No functional changes.
- Dependencies updated.
Full Changelog: auto-common-1.2.1...auto-common-1.2.2
AutoService 1.1.0
- AutoService now verifies by default that the annotated class does indeed implement the interface in
@AutoServce. Previously this only happened when compiling with-Averify=true. The verification can be disabled either by compiling with-Averify=falseor by adding@SuppressWarnings("AutoService")to the annotated class. (965e893) - The
@AutoServiceannotation can no longer be applied to an interface or abstract class. This new verification can also be disabled in the same way. (591731c)
AutoService 1.0.2
Updating Maven dependencies only. No functional changes.