5

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?

8
  • Why do you say that bytecode manipulation is not supported? There is a new Transform API that lets you do this. tools.android.com/tech-docs/new-build-system/transform-api Commented Mar 12, 2016 at 23:46
  • @saeed what do you mean compile time was less than 10-15 seconds? Jack is slower?
    – Hades
    Commented Mar 12, 2016 at 23:48
  • You are happy guy, compile my project with current compiler takes 3 minutes and 50s on my project :-) But personally I don't understand why is not possible to do class -> dex compilation faster, but jack ->dex yes. Probably the structure of jack is specially optimized to make the conversion easier.
    – ATom
    Commented Mar 12, 2016 at 23:50
  • @DougStevenson I'm using javassist and i can not use that Transform API Commented Mar 12, 2016 at 23:56
  • Since Google uses annotation processing all over the place, I am reasonably certain that Jack supports it. Commented Mar 12, 2016 at 23:56

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.