Implement JustArchi's optimizations -
https://github.com/JustArchi/android_build/commit/3b5b6ee9c09b1aed2a9a98231c37d2dfbb5c59b0