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
Rodrigo Sicarelli
July 23, 2015
Technology
0
130
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
Tweet
Share
More Decks by Rodrigo Sicarelli
See All by Rodrigo Sicarelli
Melhores práticas para encontrar Crashes utilizando o CrashLytics
rsicarelli
2
160
Firebase para Desenvolvedores
rsicarelli
4
190
A importância de ter Lazy Clients - TDC 2016
rsicarelli
3
230
Acceptance test like a pro
rsicarelli
2
190
Erlang - Why?
rsicarelli
0
74
Android Support Library v23.2.0
rsicarelli
0
57
Other Decks in Technology
See All in Technology
Werner Vogelsが14年間 問い続けてきたこと
yusukeshimizu
2
260
しろおびセキュリティへ ようこそ
log0417
0
190
最速で価値を出すための プロダクトエンジニアのツッコミ術
kaacun
1
400
新規事業における「一部だけどコア」な AI精度改善の優先順位づけ
zerebom
0
420
【インシデント入門】サイバー攻撃を受けた現場って何してるの?
shumei_ito
0
1.2k
Amazon Bedrock AgentCore EvaluationsでAIエージェントを評価してみよう!
yuu551
0
190
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
290
Regional_NAT_Gatewayについて_basicとの違い_試した内容スケールアウト_インについて_IPv6_dual_networkでの使い分けなど.pdf
cloudevcode
1
180
DEVCON 14 Report at AAMSX RU65: V9968, MSX0tab5, MSXDIY etc
mcd500
0
230
SREの仕事を自動化する際にやっておきたい5つのポイント
jacopen
6
1.2k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
66k
書籍執筆での生成AIの活用
sat
PRO
1
230
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
0
230
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
740
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
How to Talk to Developers About Accessibility
jct
2
120
Tell your own story through comics
letsgokoyo
1
800
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
420
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
69
Why Our Code Smells
bkeepers
PRO
340
58k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
59
42k
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!