diff --git a/README.md b/README.md index 0192ff51..fbdd1e07 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,12 @@ xUtils 包含了orm, http(s), image, view注解, 但依然很轻量级(251K), * 支持圆角, 圆形, 方形等裁剪, 支持自动旋转... #### 4. `view注解`: view注解模块仅仅400多行代码却灵活的支持了各种View注入和事件绑定. -* 事件注解支持且不受混淆影响...(参考sample的混淆配置) +* 事件注解支持且不受混淆影响...([参考混淆配置](xutils/consumer-rules.pro)) * 支持绑定拥有多个方法的listener #### 使用Gradle构建时添加以下依赖即可: ```javascript -implementation 'org.xutils:xutils:3.8.11' +implementation 'org.xutils:xutils:3.8.12' ``` #### 混淆配置参考示例项目sample的配置 diff --git a/sample/proguard-rules.pro b/sample/proguard-rules.pro index 6459273e..ff9ff886 100644 --- a/sample/proguard-rules.pro +++ b/sample/proguard-rules.pro @@ -14,22 +14,4 @@ # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; -#} - -################### region for xUtils --keepattributes Signature,*Annotation* --keep public class org.xutils.** { - public protected *; -} --keep public interface org.xutils.** { - public protected *; -} --keepclassmembers class * extends org.xutils.** { - public protected *; -} --keepclassmembers @org.xutils.db.annotation.* class * {*;} --keepclassmembers @org.xutils.http.annotation.* class * {*;} --keepclassmembers class * { - @org.xutils.view.annotation.Event ; -} -#################### end region \ No newline at end of file +#} \ No newline at end of file diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml index 40fb6ceb..b45b0f32 100644 --- a/sample/src/main/res/values/strings.xml +++ b/sample/src/main/res/values/strings.xml @@ -5,5 +5,5 @@ 移除 停止 开始下载 - http://dl.bintray.com/wyouflf/maven/org/xutils/xutils/3.8.11/xutils-3.8.11.aar + http://dl.bintray.com/wyouflf/maven/org/xutils/xutils/3.8.12/xutils-3.8.12.aar \ No newline at end of file diff --git a/xutils/build.gradle b/xutils/build.gradle index f7682b78..2290fa1c 100644 --- a/xutils/build.gradle +++ b/xutils/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'com.jfrog.bintray' def siteUrl = 'https://github.com/wyouflf/xUtils3' def gitUrl = 'https://github.com/wyouflf/xUtils3.git' group = "org.xutils" -version = "3.8.11" +version = "3.8.12" android { compileSdkVersion 29 @@ -15,6 +15,8 @@ android { minSdkVersion 14 versionCode 20200616 versionName version + + consumerProguardFiles "consumer-rules.pro" } buildTypes { debug { diff --git a/xutils/consumer-rules.pro b/xutils/consumer-rules.pro new file mode 100644 index 00000000..3bc3dc2a --- /dev/null +++ b/xutils/consumer-rules.pro @@ -0,0 +1,15 @@ +-keepattributes Signature,*Annotation* +-keep public class org.xutils.** { + public protected *; +} +-keep public interface org.xutils.** { + public protected *; +} +-keepclassmembers class * extends org.xutils.** { + public protected *; +} +-keepclassmembers @org.xutils.db.annotation.* class * {*;} +-keepclassmembers @org.xutils.http.annotation.* class * {*;} +-keepclassmembers class * { + @org.xutils.view.annotation.Event ; +} \ No newline at end of file