~/talk

Effective ProGuard keep rules for smaller applications

Talkat Google I/O 2018 · 2018-05-08..05-10· [android, developer-experience]
slides:none on file

R8 replaces ProGuard as a shrinker and uses the same keep‑rule language, but causes about 200 build errors on naive minify by default because reflection, annotations and Java APIs missing on Android break static analysis; fixing requires forensics, five targeted keep/warning rules and specific modifiers such as allowshrinking modifier, plus keep class members for getters/setters and supplying AAPT‑generated manifest rules; result: Guava drops from 1.4MB to 8KB, AndroidPlot 180KB to ~100KB, app code 35KB to 2KB.

AI-written summary · about

  1. 0:00Introduction
  2. 1:25Why it matters
  3. 9:30ProGuard
  4. 11:18AIT
  5. 15:25Android
  6. 23:04How to fix this
  7. 23:20AndroidPlots keep rule
  8. 24:11Adb log
  9. 24:59Reflection
  10. 26:34KeepClass
  11. 27:32Modifiers
  12. 28:34Checking the code
  13. 29:26Plot serious
  14. 30:29Keep class members
  15. 31:56Results
  16. 33:21Tips
  17. 34:38Library Developer
  18. 35:31Feedback
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.