Skip to content

Releases: google/auto

AutoValue 1.11.0

31 May 19:27
Compare
Choose a tag to compare

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.0 or org.jetbrains.kotlin:kotlin-metadata-jvm:2.0.0 to client code that uses AutoBuilder to build Kotlin classes. The metadata API has changed from kotlinx.metadata to kotlin.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 @Nullable primitive parameter. Primitive types cannot be null, 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 says new AutoValue_Foo.Builder(this) rather than just new Builder(this), to do the right thing if an extension generates its own subclass of Builder. (324470b)
  • The "copy constructor" in a generated Builder is 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

20 Nov 23:18
Compare
Choose a tag to compare
  • AutoFactory now recognizes and generates both javax.inject and jakarta.inject. If jakarta.inject is on the classpath then it will be used, and otherwise javax.inject. A new compiler option -Acom.google.auto.factory.InjectApi can be set to either javax or jakarta to 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 @Target with both PARAMETER and TYPE_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

08 Sep 23:40
Compare
Choose a tag to compare
  • 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 for TYPE_USE @Nullable or if the method had @CopyAnnotations, but now @Nullable will be copied in other cases too. (4506804)

AutoValue 1.10.3

15 Aug 20:31
Compare
Choose a tag to compare
  • An "incompatible version" issue with Kotlin compilation has been fixed. See #1574. (b21c7f4)
  • A warning is now produced if a setX method in a Builder or its return type is marked @Nullable. Those methods always return the Builder instance, which is never null. (e5b4b54)

AutoValue 1.10.2

28 Jun 17:32
Compare
Choose a tag to compare
  • The constructor parameter names in the class generated by @Memoized no 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 @Nullable bound, 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 whose build() method returns List<? extends T>. (8ba4531)
  • Made it easier to support @CopyAnnotations in AutoValue extensions, via new methods classAnnotationsToCopy and methodAnnotationsToCopy. (a3f218d)
  • Generated builders now include a @Nullable type annotation on appropriate builder fields if one is available. (91d5f32)
  • Updated @AutoAnnotation documentation to say that it isn't needed in Kotlin. (600b4b6)
  • Maven dependencies have been updated, fixing #1532.

auto-service-1.1.1

12 Jun 16:36
Compare
Choose a tag to compare

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

12 Jun 16:39
Compare
Choose a tag to compare

What's Changed

  • No functional changes.
  • Dependencies updated.

Full Changelog: auto-common-1.2.1...auto-common-1.2.2

AutoService 1.1.0

23 May 17:22
Compare
Choose a tag to compare
  • 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=false or by adding @SuppressWarnings("AutoService") to the annotated class. (965e893)
  • The @AutoService annotation 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

23 May 16:59
Compare
Choose a tag to compare

Updating Maven dependencies only. No functional changes.

AutoValue 1.10.1

17 Nov 22:06
Compare
Choose a tag to compare
  • Two annotations from org.jetbrains.annotations were accidentally included unshaded in the AutoValue jar. That has been fixed. (6de325b)
  • Fixed an issue when a builder has a property foo with both a getter foo() and a builder fooBuilder(). (3659a0e)