Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ProGuard - O que é e porque utilizar
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Rodrigo Sicarelli
July 23, 2015
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ProGuard - O que é e porque utilizar
Com pouco esforço, melhore substancialmente o tamanho e a qualidade do seu aplicativo
Rodrigo Sicarelli
July 23, 2015
More Decks by Rodrigo Sicarelli
See All by Rodrigo Sicarelli
Melhores práticas para encontrar Crashes utilizando o CrashLytics
rsicarelli
2
170
Firebase para Desenvolvedores
rsicarelli
4
190
A importância de ter Lazy Clients - TDC 2016
rsicarelli
3
240
Acceptance test like a pro
rsicarelli
2
200
Erlang - Why?
rsicarelli
0
77
Android Support Library v23.2.0
rsicarelli
0
62
Other Decks in Technology
See All in Technology
AI時代の闇と光
tatsuya1970
0
110
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
14
2.1k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.4k
AI Driven AI Governance
pict3
0
480
非定型なドキュメントを効率よくリファクタする 〜えぇ!?仕様書27本の移行が1日で終わったって!?〜
subroh0508
2
550
Genie Ontologyは銀の弾丸かを考える / Is Genie Ontology a Silver Bullet?
nttcom
0
390
AmplifyHostingConstructからSSRフレームワークのためのホスティング設計を考察する/amplify-hosting-construct
fossamagna
1
230
Compose 新機能総まとめ / What's New in Jetpack Compose
yanzm
0
320
AI時代のPlaywright活用(システムテストを自動化する ー 実行エンジンにPla ywrightを選んだ理由)
ynisqa1988
0
130
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
2
130
Data + AI Summit 2026 イベントレポート: 「AIがビジネスで意思決定するデータ基盤」へ
nek0128
0
260
シンガポールで登壇してきます
yama3133
0
240
Featured
See All Featured
Scaling GitHub
holman
464
140k
Making Projects Easy
brettharned
120
6.7k
Automating Front-end Workflow
addyosmani
1370
210k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
350
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
Building an army of robots
kneath
306
46k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
45k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How to build a perfect <img>
jonoalderson
1
5.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.3k
4 Signs Your Business is Dying
shpigford
187
22k
Transcript
O que é e por que utilizar ProGuard
Android Developer @EasyTaxi +RodrigoSicarelli2 github.com/sicachester/weather-guard
None
Otimizando sua aplicação com o ProGuard O que é o
ProGuard? Como funciona Shrinker, Optimizer & Obfuscator Como utilizar em seu projeto
O que é o ProGuard? Genérico Para Java bytecode Shrinker,
optimizer & obfuscator Existe desde 2002 2010 se tornou parte do Android SDK
Como funciona Processed Code Shrink Optimize Obfuscate Android Runtime Application
code Libraries Android Runtime
Android builds Android Asset Packaging Tool Assets XML Res Application
Java source Libraries Java bytecode Assets Compiled XML Res Dalvik bytecode Application Java source Application Java bytecode Libraries Java bytecode Proguard
Por que utilizar? Redução do tamanho de sua aplicação Performance
Remover código de Log, Debug ou códigos de teste Proteção
Shrinking
Shrinking Também chamado de tree shaking, minimizing, shrouding
Shrinking Classe Classe
None
Entry points
getDefaultProguardfile('proguard-android.txt'),'my-rules.pro' Android Play services
Remoção de código morto Propagação de constantes Métodos "inline" Merging
de classes Remoção de logs Otimizações peephole Desvirtualização de métodos ... Optimization
None
None
None
Obfuscating
None
Obfuscating Renomeação: classes/métodos/atributos Remoção de informação de debug: número de
linha, variáveis locais, etc.
None
tamanho das classes.dex tamanho do .apk final Original ProGuard Redução
Original ProGuard Redução ApiDemos 716 kb 482 kb 33 % 2.6 mb 2.5 mb 4 % GoogleIO 3.4 mb 905 kb 75 % 1.9 mb 906 kb 53 % EasyTaxi Driver 7.5 mb 3.7 mb ~ 50 % 5.9 mb 4.5 mb ~ 24 % EasyTaxi Passenger 7.9 mb 2.9 mb ~ 64 % 8 mb 6.2 mb ~ 23 % Redução da aplicação
Original ProGuard Sieve score 6.833 6.666 Loop score 14.831 15.473
Logic score 19.038 47.840 String score 7.694 7.717 Float score 6.425 6.488 Method score 4.850 5.229 Score total 8.794 10.436 + 18% Performance
Como habilitar
Just do it!
Android Developer @EasyTaxi +RodrigoSicarelli2 github.com/sicachester/weather-guard
[email protected]
Obrigado!