From a79cf780fc87af5a5b3726d5df2851c30652cc2c Mon Sep 17 00:00:00 2001 From: Milk <1871357815@qq.com> Date: Wed, 16 Feb 2022 15:51:27 +0800 Subject: [PATCH] update proguard rules --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 111570e..6e241f5 100644 --- a/README.md +++ b/README.md @@ -20,8 +20,8 @@ allprojects { ``` #### Step 2. 需要使用的模块内引入 ```gradle -implementation 'com.github.CodingGay.BlackReflection:core:1.0.3' -annotationProcessor 'com.github.CodingGay.BlackReflection:compiler:1.0.3' +implementation 'com.github.CodingGay.BlackReflection:core:1.0.4' +annotationProcessor 'com.github.CodingGay.BlackReflection:compiler:1.0.4' ``` ### Demo @@ -75,6 +75,21 @@ BRActivityThread是程序自动生成的类,生成规则是BR + ClassName @BParamClass | Parameter | 注明该参数的Class,用于反射时寻找方法 @BParamClassName | Parameter | 注明该参数的Class,用于反射时寻找方法 +### 混淆配置 +``` +-keep class top.niunaijun.blackreflection.** {*; } +-keep @top.niunaijun.blackreflection.annotation.BClass class * {*;} +-keep @top.niunaijun.blackreflection.annotation.BClassName class * {*;} +-keep @top.niunaijun.blackreflection.annotation.BClassNameNotProcess class * {*;} +-keepclasseswithmembernames class * { + @top.niunaijun.blackreflection.annotation.BField.* ; + @top.niunaijun.blackreflection.annotation.BFieldNotProcess.* ; + @top.niunaijun.blackreflection.annotation.BFieldSetNotProcess.* ; + @top.niunaijun.blackreflection.annotation.BMethod.* ; + @top.niunaijun.blackreflection.annotation.BStaticField.* ; + @top.niunaijun.blackreflection.annotation.BStaticMethod.* ; +} +``` ### License > ```