Java 8 and Android and You

Java 8 and Android and You

Let's look at the status of Java 8 in the Android world. How can you use it? What are the limitations? Workarounds? And what is this thing with Jack and Jill anyway?

-----

Hack & Tell presented at Novoda -> http://novoda.tv
Video: https://www.youtube.com/watch?v=lEwIK3EY2g8

4580c218737149bf44d012a110612010?s=128

Sebastiano Poggi

March 21, 2017
Tweet

Transcript

  1. Sebastiano Poggi java 8 and android and you

  2. java 8

  3. java 8?

  4. yes, but… java 8?

  5. None
  6. java 8 added in android 7.0 no more harmony switched

    to openjdk partial support* *varies by os version
  7. java 8 best case scenario (api 24+) lambdas and method

    references java.util.function streaming and reflection apis repeatable annotations default and static interface methods
  8. java 8 on pre-24 lambdas and method references java.util.function runtime

    crash! streaming and reflection apis repeatable annotations default and static interface methods
  9. jack

  10. None
  11. jack new compiling toolchain no javac/dx, one tool to rule

    them all .jack bytecode as intermediate language jill handles legacy .class files supports java 8 language features
  12. jack? yes, but…

  13. jack no .class means no java tooling no *guard, no

    mockito, no jacoco... no instant run support in alpha since announced and most importantly…
  14. DEPRECATED

  15. very cool!

  16. very cool! yes, but…

  17. what does that mean?

  18. the future likely to match jack java 8 support language

    features: partial backport new api: no backport basically like using retrolambda we can keep our tooling
  19. under the hood desugarer from bazel backports java 8 features

    bytecode manipulation anon inner classes for lambdas again, just like retrolambda (ish)
  20. source: https://realm.io/news/360andev-jake-wharton-java-hidden-costs-android/

  21. …questions