Skip to content

Commit

Permalink
新增混淆配置
Browse files Browse the repository at this point in the history
  • Loading branch information
xuexiangjys committed Jan 10, 2021
1 parent bc6aeb6 commit 8224f3c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ allprojects {
dependencies {
...
// XPage
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.0'
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.0'
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.1'
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.1'
// ButterKnife的sdk
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
Expand Down Expand Up @@ -107,8 +107,8 @@ apply plugin: 'kotlin-kapt'
dependencies {
...
//XPage
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.0'
kapt 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.0'
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.1'
kapt 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.1'
//ButterKnife的sdk
implementation 'com.jakewharton:butterknife:10.1.0'
kapt 'com.jakewharton:butterknife-compiler:10.1.0'
Expand Down Expand Up @@ -373,6 +373,7 @@ if (tabAFragment != null) {
# xpage
-keep class com.xuexiang.xpage.annotation.** { *; }
-keep class com.xuexiang.xpage.config.** { *; }
```

---
Expand Down
Binary file modified apk/xpage_demo.apk
Binary file not shown.
1 change: 1 addition & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@

# xpage
-keep class com.xuexiang.xpage.annotation.** { *; }
-keep class com.xuexiang.xpage.config.** { *; }

# xaop
-keep @com.xuexiang.xaop.annotation.* class * {*;}
Expand Down
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ allprojects {
dependencies {
...
// XPage
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.0'
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.0'
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.1'
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.1'
// ButterKnife的sdk
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
Expand Down Expand Up @@ -76,8 +76,8 @@ apply plugin: 'kotlin-kapt'
dependencies {
...
//XPage
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.0'
kapt 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.0'
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.1.1'
kapt 'com.github.xuexiangjys.XPage:xpage-compiler:3.1.1'
//ButterKnife的sdk
implementation 'com.jakewharton:butterknife:10.1.0'
kapt 'com.jakewharton:butterknife-compiler:10.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ private List<PageInfo> getPagesByClass(Class<?> clazz) throws Exception {
// 获取单例对象
Method getInstanceMethod = clazz.getDeclaredMethod("getInstance");
getInstanceMethod.setAccessible(true);
Object instance = getInstanceMethod.invoke(null, null);
Object instance = getInstanceMethod.invoke(null);
// 获取页面信息
Method getPagesMethod = clazz.getDeclaredMethod("getPages", null);
Method getPagesMethod = clazz.getDeclaredMethod("getPages");
getPagesMethod.setAccessible(true);
return (List<PageInfo>) getPagesMethod.invoke(instance, null);
return (List<PageInfo>) getPagesMethod.invoke(instance);
}
}

0 comments on commit 8224f3c

Please sign in to comment.