D8 Compiler is much slower than Dx Compiler

824 views Asked by At

I've updated Android Gradle Plugin to 3.3.2 and faced with the issue that build time is dramatically slower in comparison with 3.0.1.

DX takes 1min 40s - 2min 20s for clean build and around 1 min for rebuild when D8 takes 9min for clean build and around 7min for rebuild

After some investigation I found out that D8 compiler is turned on by default since 3.1.+ and it can be turned off, but from 3.3.+ it won't be possible.

This is gradle.properties

org.gradle.jvmargs=-Xmx4608m
org.gradle.caching=true
org.gradle.parallel=true
android.enableD8=true
android.enableD8.desugaring=true

Also

minifyEnabled false
shrinkResources false

--scan shows that transformClassesWithDexBuilder takes 5-7 minutes to finish, is there any way how to increase build speed without turning off D8?

0

There are 0 answers