About

FreeProGuard has been working on a confuse-free library for Android developers for a long time, but has only recently been able to implement it. The library uses consumerProguardFiles to pass confuse-free configuration from aar to the main project. Some friendly libraries already use this method, and I hope more open source libraries use this method to save developers from configuration obfuscations. This library has the following obfuscations (including different versions of the library) :

  • AndroidCommon
  • AliPay (need anti-mixing JAR (- Libraryjars libs/ AlipaySDK-20150602.jar))
  • AndFix
  • AndroidEventBus
  • AndroidUniversalImageLoader
  • ARouter
  • BaiduMap (-Libraryjars libs/ Baidumapapi_v2_1_1.jar)
  • BaseRecyclerViewAdapterHelper
  • Bugly
  • ButterKnife
  • Dagger
  • EventBus
  • Fastjson
  • Fresco
  • GaoDeMap
  • Getui
  • Glide
  • GreenDAO
  • Gson
  • Ijkplayer
  • Guava
  • Jackson
  • JPush
  • LitePal
  • Mars
  • MiPush
  • Nuwa
  • OkHttp
  • PingPlusPlus
  • Realm
  • Retrofit
  • Retrolambda
  • RongCloud
  • RxJava
  • ShareSDK
  • SinaWeiboSDK
  • Stetho
  • Tencent
  • UMeng
  • UnionPay
  • Volley
  • XinGe
  • XunFei
  • ZXing

How to use

  1. First turn on obfuscation, setminifyEnabled true;
  2. Add dependencies:
    implementation "Com. Blankj: free - proguard: 0.0.7"
    Copy the code
  3. Add the entity class in the project toproguard-rules.proIn the file, is generally-keep class urpackage.xx.bean/entity/model.** { *; }, or using@KeepAnnotate these entity classes;
  4. Add the JARS in your project that you need to prevent confusionproguard-rules.proFile, such as alipay SDK-libraryjars libs/alipaySDK-20150602.jar, if you want to be mixproof for all jars-libraryjars libsCan;
  5. Configure the tripartite libraries used in the project that are not included in the above listproguard-rules.proIn the file, orTo issueAdd it to the library.

Profit

  1. If obfuscating is enabled, the names of all variables, functions and classes in the code will be changed into short English letter codes (which can also be customized). In the absence of corresponding function names and program comments, it will be difficult to read even if it is decomcompiled, which improves the security of the application.
  2. Obfuscation Can further reduce the application size by analyzing bytecode, removing redundant code, and shortening the names of variables, functions, and classes. If you want to obfuscate resource files, you can use wechat AndResGuard.

Last but not least

If this library can save you 10 minutes or more, please share it with others to help more developers save time to spend more time with their families, exercise more, and do more things they love. I hope open source can help more people, and I hope more people join open source.

ChangeLog

Since the library has just been released, more anti-confusion rules will be added, so the version number will be iterated over and over again, and the 1.0.0 version will be used when it stabilizes.

Since the library has just been released, more anti-confusion rules will be added, so the version number will be iterated over and over again, and the 1.0.0 version will be used when it stabilizes.

Since the library has just been released, more anti-confusion rules will be added, so the version number will be iterated over and over again, and the 1.0.0 version will be used when it stabilizes.