{{Short description|Open-source Java obfuscation tool}} {{Use mdy dates|date=November 2014}} {{Infobox software | name = ProGuard | screenshot = ProGuard.png | caption = ProGuard GUI | collapsible = | developer = Eric P.F. Lafortune<ref>{{cite web |title=Eric Lafortune home page |url=http://www.lafortune.eu/ |accessdate=November 24, 2015}}</ref> | latest release version = {{wikidata|property|edit|reference|P348}} | latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}} | programming language = Java | operating system = Cross-platform | genre = | license = GPLv2.0<ref name="license">{{cite web |url=https://proguard.sourceforge.net/license.html |title=ProGuard license page |author= |date= February 2, 2015|accessdate=Nov 24, 2015}}</ref> | website = {{URL|https://www.guardsquare.com/en/products/proguard}} }}
'''ProGuard''' is an open source command-line tool which shrinks, optimizes and obfuscates Java code. It was created by Belgian software engineer Eric Lafortune and later formed the basis of Guardsquare, the mobile application security company he co-founded.<ref>{{Cite web |date=2019-01-30 |title=Battery Ventures pays $29 million for a majority stake in Belgium's Guardsquare |url=https://tech.eu/2019/01/30/battery-ventures-pays-29-million-for-a-majority-stake-in-belgiums-guardsquare/ |access-date=2026-03-31 |website=Tech.eu |language=en-GB}}</ref> It is able to optimize bytecode as well as detect and remove unused instructions.<ref>{{cite web |url=https://proguard.sourceforge.net/index.html |title=ProGuard overview (official page) |date=February 2, 2015 |accessdate=Nov 24, 2015}}</ref> ProGuard is free software and is distributed under the GNU General Public License, version 2.<ref name="license"/>
ProGuard was distributed as part of the Android SDK and ran when building the application in release mode.<ref>{{cite web |url=https://developer.android.com/studio/build/shrink-code |title=Shrink your code and resources |accessdate=June 10, 2018}}</ref>
== Features ==
* Bytecode-level optimizations; * Also works with Java Micro Edition and Android;
=== Obfuscation Method=== ProGuard obfuscates Java and Android programs by renaming classes, fields, and methods using meaningless names (an implementation of security through obscurity), making it more difficult to reverse-engineer the final application.<ref name="faq">{{cite web |url=https://proguard.sourceforge.net/FAQ.html |title=ProGuard FAQ |date=February 2, 2015 |accessdate=Nov 24, 2015 |archive-date=October 28, 2016 |archive-url=https://web.archive.org/web/20161028095555/http://proguard.sourceforge.net/FAQ.html |url-status=dead }}</ref>
=== Optimization ===
Besides removing unused instructions from the compiled bytecode, ProGuard optimizes it using techniques such as control flow analysis, data-flow analysis, partial evaluation, static single assignment, global value numbering, and liveness analysis.<ref name="faq"/>
ProGuard can remove many types of unused and duplicated code, perform over 200 peephole optimizations, reduce variable allocation, inline constant and short methods, simplify tail recursion calls, remove logging code, amongst others.<ref name="faq"/>
== See also == {{Portal|Free and open-source software|Computer programming}} * Java (programming language) * Program optimization * Obfuscation (software) * Dotfuscator * DashO (software)
==References== {{Reflist}}
Category:Software obfuscation Category:Free software programmed in Java Category:Software using the GNU General Public License