Shrink, Secure & Optimize Your App With R8
summary
R8 replaces ProGuard and folds D8 desugaring into a single pass that both compiles and shrinks, yielding roughly around 20% smaller dex artifacts in many cases by using tree shaking plus aggressive minification. It applies dead‑code elimination, constant folding and bytecode optimizations guided by explicit keep rules, emits a mapping file for stack traces, and gives library authors a way to package consumer‑friendly rules. Integrates into the Gradle pipeline and demonstrably reduces APK size and method count in production builds.
AI-written summary · about
chapters (14)
- 0:00Introduction to R8
- 2:57What is R8 compiler
- 5:24R8 as shrinker and optimizer
- 7:31Benefits of using R8
- 11:23R8 configuration language
- 13:52Security with R8
- 18:18R8 in Android Studio
- 24:08Text-to-speech optimization
- 27:21Consumer profiles and R8
- 31:23R8 for app development
- 33:25Android tips with R8
- 34:34Replacing ProGuard with R8
- 39:33Best practices with R8
- 40:41Final thoughts and Q&A
related talks
27mFrom ProGuard to R8: Take Care of Your Bytecode
36mPractical obfuscation guide
37mEffective ProGuard keep rules for smaller applications
41mDigging into D8 and R8
33mHow ProGuard Works
28mEscaping from a 'It Kinda Works' ProGuard Setup
36mAdvanced Android app shrinking techniques
32mRedex, Your Build, And You
