Search code examples
androidandroid-jack-and-jill

What are the advantages of using Jack and Jill?


After announcement of Android N, Google officially launching Jack toolchain with Android Studios 2.1.

The main advantages of Jack (due to this page) are:

Completely open source

Available in AOSP; partners are welcome to contribute.

Speeds compilation time

Jack has specific supports to reduce compilation time: pre-dexing, incremental compilation and a Jack compilation server.

Handles shrinking, obfuscation, repackaging and multidex

Using a separate package such as ProGuard is no longer necessary.

But annotation processing, code weaving (e.g. aspectj) , bytecode manipulation are not supported (which are really important for me).

Also speeds compilation time was not sensible for me, I created a sample project with a little bunch of dependencies and in both jack and default compiler, the compile and build time was less than 10-15 seconds.

So Why do I migrate to Jack?


Solution

  • Now with Android Gradle Plugin version 2.2.0-alpha1 or higher, annotation processing is supported by default.

    Also due to this issue transform API, which is useful for bytecode weaving, will be supported later.