Before adding code obfuscation to the company's app, there were a number of problems in the code obfuscation process, plus a recent study of the development of the Android Studio plug-in, so developing a code obfuscation plugin facilitates project code confusion.
List of third-party libraries
The plugin's backend is now integrated with the code obfuscation of the third-party open Source Library, as well as the basic code obfuscation, and is also trying to add, and you are also welcome to confuse the code with third-party open source libraries that are not available in the new issue submission list. (You think trivial things, maybe can help others busy ~)
Use
- Download the Androidproguard plugin and install the reboot. Download
- Select the Androidproguard option from the Edit drop-down menu in the menu bar.
- If the Success dialog box pops up, you can press CTRL + V to paste into the project's Proguard-rules.pro file.
- According to Proguard-rules.pro error of the prompt to modify into.
- You can test the obfuscation effect by modifying the Gradle file in the project app to True minifyenabled. (You can use Androidkiller anti-compilation to see the effect, the use of Androidkiller can refer to this article I wrote here)
Attention
-
The actual project will usually have multiple module, the code for multiple module confusion on-line data is relatively small, after my experiment: for multiple module projects, Add the obfuscation code to the Proguard-rules.pro file in the app's module (i.e. app) and minifyenabled open in Gradle.
-
If the project reports warn information at compile time, you can use-keep or-dontwarn to retain the Warn class.
At last
I know the project code confusion is usually confused once, a lot of people think the meaning of this plugin is not very, but I can tell you I think so, but I have no way to stop my action ~ haha ~ ~
Project GitHub Address: Https://github.com/zhonghanwen/AndroidProguardPlugin
Android Studio Code Obfuscation Plugin