Android N Java 8 features (Jack compiler) and Kotlin interop

Tudor Luca picture Tudor Luca · Mar 10, 2016 · Viewed 8.9k times · Source

Update 3. KOTLIN IS NOW OFFICIALLY SUPPORTED FOR ANDROID DEVELOPMENT. BY GOOGLE. YAAAAAAAAS!

Update 2: It looks like JetBrains is really committed to supporting Kotlin for Android in the long run. I'm a happy kotlin user :).

Update: Hadi Hariri, from JetBrains, mentioned they're going to release some info on this topic. I will update this post once they do.


=== DEPRECATED STUFF NEXT ===

Google just released a preview for the upcoming Android N with some interesting features, the most notable being partial Java 8 language support. This is possible due to the new Jack toolchain Google is working on.

The current toolchain using javac or kotlinc:
javac (.java --> .class) --> dx (.class --> .dex)
kotlinc (.kt --> .class) --> dx (.class --> .dex)

New Jack toolchain:
Jack (.java --> .jack --> .dex)

I am assuming Google will push forward towards making Jack the default toolchain for Android development. Update: Jack is now deprecated. Yas.

My question is how will this new toolchain affect me, in the future, as a kotlin user for Android development? Will I get "stuck in the past"?

Answer

Lukas Bergstrom picture Lukas Bergstrom · Mar 11, 2016

disclaimer: I work on Jack

This won't affect you. Kotlin's compiler produces Java 6 bytecode, which Jack/Jill can import just fine.