Cordova plugin which activates ProGuard and minification for debug and release builds in your cordova mobile application.
ProGuard is the open source optimizer for Java bytecode
You can read more about it on ProGuard official website and on android developer portal
- If you already have installed Android Studio then seems you already have installed ProGuard on your machine. If no, then you should download and install it manually from ProGuard official website.
cordova plugin add cordova-plugin-proguard
- this command will configure yourbuild.gradle
file and copyproguard-custom.txt
to${androidPlatformDirectory}/assets/www/proguard-custom.txt
proguard-custom.txt
file contains some basic rules for your cordova mobile app. Feel free to fork this repo and modify it as you want.
You can also to check out some Android ProGuard snippets
- v1.0.0 - supports Cordova version <7
- v2.0.0 - supports Cordova version 7+ (thanks to @SujitSingh)
MIT © Aleksandr Filatov