Unity导出Android源码对后加入的架包进行混淆
1.导出源码
2.打开launcher\build.gradle文件
3.开启混淆配置,如图:
4.在unityLibrary\proguard-unity.txt中增加以下配置:
-useuniqueclassmembernames # 把混淆类中的方法名也混淆
-keep class org.json.**{*;}
-dontwarn com.alibaba.fastjson2.**
-keep class com.alibaba.fastjson2.**{*;}
-dontwarn com.alibaba.fastjson.**
-keep class com.alibaba.fastjson.** { *; }
-keepattributes Signature
-keepattributes Annotation
-keepattributes InnerClasses