Introduction to AutoValue

Introduction to AutoValue

I have talked about AutoValue, a library that generates Immutable value-type codes for Java 1.6+. This talk is an introduction to AutoValue library; check out the links below to learn more about AutoValue. I am guessing that those articles and the talk will help you understand more about AutoValue itself and the power of it.

* “A Deeper Look at AutoValue” - Ryan Harter

http://ryanharter.com/blog/2016/04/08/autovalue-deep-dive/

* “AutoValue Extensions” - Ryan Harter

http://ryanharter.com/blog/2016/05/16/autovalue-extensions/

* “AutoValue Extensions” - Jake Wharton

http://jakewharton.com/auto-value-extensions-ny-android-meetup/

F9856cc7a15ed2cb9e6ebfab41fdf1cf?s=128

Shohei Kawano

June 23, 2016
Tweet

Transcript

  1. 3.
  2. 4.
  3. 8.
  4. 9.
  5. 12.
  6. 14.
  7. 16.
  8. 18.
  9. 20.
  10. 21.
  11. 24.
  12. 26.

    Usage // root dependencies { classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’ … } …

    // app dependencies { provided 'com.google.auto.value:auto-value:1.3-rc2' }
  13. 29.
  14. 30.

    AutoValue • Add @AutoValue to make objects value- typed using

    generated boilerplate codes • Add @AutoValue.Builder to create Builder class for your auto-value object
  15. 32.
  16. 33.

    AutoValue • Add @AutoValue to make objects value- typed using

    generated boilerplate codes • Add @AutoValue.Builder to create Builder class for your auto-value object • AutoValue Extension support for 
 Parcelable, Gson, Moshi, Cursor, and more..
  17. 34.

    Usage(auto-value-parcel) // root dependencies { classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8’ … } …

    // app dependencies { provided ‘com.google.auto.value:auto-value:1.3-rc2' // auto-value-parcel apt 'com.ryanharter.auto.value:auto-value-parcel:0.2.3-rc2' }
  18. 36.
  19. 37.

    Learn more about AutoValue: • “A Deeper Look at AutoValue”

    - Ryan Harter
 http://ryanharter.com/blog/2016/04/08/autovalue-deep- dive/ • “AutoValue Extensions” - Ryan Harter
 http://ryanharter.com/blog/2016/05/16/autovalue- extensions/ • “AutoValue Extensions” - Jake Wharton
 http://jakewharton.com/auto-value-extensions-ny- android-meetup/