Created by: kageiit
Summary
- Ref #1459 (closed)
- Support for D8
- D8 source obtained from https://r8.googlesource.com/r8 (615337ac6cf167f8f242f0ac6dfd824a47beebe8)
- Enable with a flag in
android_binary
rules
dex_tool = d8
Benchmarking
Tested against https://github.com/uber/okbuck with ./gradlew :okbuck -Dokbuck.wrapper=true && buck targets --type android_binary | xargs buck build
With Dx on branch master
(Has retrolambda for java 8 support)
Building: finished in 01:10.8 min (100%) 646/646 jobs, 646 updated, 97.4% cache miss
With D8 on branch test_d8
(No need for retrolambda as D8 supports desugaring out of the box)
Building: finished in 54.1 sec (100%) 612/612 jobs, 612 updated, 97.2% cache miss
Overall build Speedup: 24 %
Longest Dx Step (for io.reactivex.rxjava2.rxjava-2.1.1.jar
)
Dx time: 12.2 s
D8 time: 8 s
Dexing step speedup: 35 %
Build locally and look at the buck trace files for more info if interested.
Binary sizes
Total size of all apks built by Dx - 22 Mb D8 - 20 Mb
Apk Size savings - 9 %