Difference Between Proguard and R
- R8 has more Kotlin support than that of Proguard.
- R8 is having a faster processing time than Proguard which reduces build time.
- R8 gives better output results than Proguard.
- R8 reduces the app size by 10 % whereas Proguard reduces app size by 8.5 %.
- The android app having a Gradle plugin above 3.4.0 or above then the project uses R8 by default with Proguard rules only.
Proguard
In Proguard java compiler converts Apps code into JAVA bytecode and proguard will converts this bytecode into the optimized java bytecode. This java bytecode is then optimized by dex into Optimized Dalvik bytecode. The conversion process of apps code to optimized Dalvik bytecode is a four steps process.
R8
In R8 java compiler converts Apps code in JAVA bytecode and then R8 will directly convert JAVA bytecode into Optimized Dalvik bytecode. The conversion process of apps code to Optimized Dalvik bytecode is a three steps process that is faster in comparison with proguard.
Difference Between Proguard and R8 in Android
Proguard and R8 both are similar tools that are used for reducing the size of our APK and increase the performance of our APK by shrinking the unused resources. In this article, we will take a look at:
- What is Proguard?
- What is R8?
- Difference between Proguard and R8.
Contact Us