Skip to content

Commit 778b072

Browse files
committed
feat:proguard-rules.pro
1 parent 824b7b5 commit 778b072

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Rudolph Android Router Framework(鲁道夫安卓路由框架组件)
44

5-
[ ![Download](https://api.bintray.com/packages/wuzongbo/maven/rudolph/images/download.svg) ](https://bintray.com/wuzongbo/maven/rudolph/_latestVersion)
5+
[![Download](https://api.bintray.com/packages/wuzongbo/maven/rudolph/images/download.svg)](https://bintray.com/wuzongbo/maven/rudolph/_latestVersion)
66
[![Maven](https://img.shields.io/badge/Jcenter-Android--Rudolph--Router-green.svg?style=true)](http://jcenter.bintray.com/cn/wzbos/android)
77
<p>
88
<img src="Rudolph.png" height="230"/>
@@ -68,17 +68,6 @@ dependencies {
6868
kapt "cn.wzbos.android:rudolph-compiler:$rudolph_version"
6969
}
7070
```
71-
### 3.代码混淆
72-
73-
如果开启了代码混淆,只需要在混淆配置文件中添加如下配置
74-
75-
```
76-
-keep class * implements cn.wzbos.android.rudolph.IRouteTable{*;}
77-
-keep class * implements cn.wzbos.android.rudolph.IRouteBinder{*;}
78-
-keepclassmembers class ** {
79-
@cn.wzbos.android.rudolph.annotations.Route <methods>;
80-
}
81-
```
8271

8372
### 4.调用方式
8473

rudolph/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ android {
1717
targetSdkVersion versions.targetSdk
1818
versionName = rudolph_version
1919
versionCode = 1
20+
consumerProguardFiles 'proguard-rules.pro'
2021
}
2122

2223
buildTypes {

rudolph/proguard-rules.pro

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/wuzongbo/Library/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
-keep class * implements cn.wzbos.android.rudolph.IRouteTable{*;}
19+
-keep class * implements cn.wzbos.android.rudolph.IRouteBinder{*;}
20+
-keepclassmembers class ** {
21+
@cn.wzbos.android.rudolph.annotations.Route <methods>;
22+
}

0 commit comments

Comments
 (0)