greybax / cordova-plugin-proguard

:white_square_button: Cordova Plugin for ProGuard
MIT License
51 stars 265 forks source link
android android-development androidutils apk-size bytecode cordova cordova-android cordova-android-plugin cordova-plugin gradle gradle-plugin hybrid-apps java minifier obfuscator optimization-tools optimizer proguard proguard-rules shrink

cordova-plugin-proguard

NPM version npm

Cordova plugin which activates ProGuard and minification for debug and release builds in your cordova mobile application.

What is ProGuard?

ProGuard is the open source optimizer for Java bytecode

You can read more about it on ProGuard official website and on android developer portal

How to use

Customization

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

If you want to add rules to this proguard-custom.txt, please create your own proguard-custom.txt and add this to your projectroot folder. Upon installing the proguard-plugin, the rules will be added to your project. Example rules for various situations will be in the commented section in the plugin proguard-custom.txt.

ionic cordova platform rm android
ionic cordova platform add android

History

Why I've done this plugin?

https://alfilatov.com/posts/how-to-setup-proguard-in-cordova-application/

License

MIT © Aleksandr Filatov