Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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

Sebastiano Poggi

March 21, 2017
Tweet

More Decks by Sebastiano Poggi

Other Decks in Technology

Transcript

  1. java 8 added in android 7.0 no more harmony switched

    to openjdk partial support* *varies by os version
  2. 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
  3. 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
  4. 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
  5. jack no .class means no java tooling no *guard, no

    mockito, no jacoco... no instant run support in alpha since announced and most importantly…
  6. 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
  7. under the hood desugarer from bazel backports java 8 features

    bytecode manipulation anon inner classes for lambdas again, just like retrolambda (ish)