All Products
Search
Document Center

Add obfuscation rules

Last Updated: Mar 10, 2021

About this topic

Apps developed on mPaaS Android clients are compiled using Java codes which may easily be decompiled. Therefore, we need to use Android ProGuard obfuscation files to protect Java source codes. This topic describes the process to add obfuscation rules in native AAR access mode.

Procedure

1.Execute a task to generate obfuscation files.

Click mPDebugProguardTask or mPReleaseProguardTask.39

2.After the execution, obfuscation files will be added to the project, as shown in the following figure.

40

3.Append the generated obfuscation files to the obfuscation policy.

41

Note: If ‘transformClassesAndResourcesWithR8ForRelease’ is frozen during obfuscation, we recommend that you disable R8 and then perform obfuscation again. To disable R8:

Add android.enableR8=false in gradle.properties.42