-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresguard.gradle
executable file
·109 lines (94 loc) · 2.81 KB
/
resguard.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
apply plugin: 'AndResGuard'
// https://github.com/shwenzhang/AndResGuard/blob/master/doc/white_list.md
andResGuard {
mappingFile = null
use7zip = true
useSign = true
// it will keep the origin path of your resources when it's true
// 打开这个开关,会keep住所有资源的原始路径,只混淆资源的名字
keepRoot = false
compressFilePattern = [
"*.png",
"*.jpg",
"*.jpeg",
"*.gif",
"resources.arsc"
]
whiteList = [
// your icon
"R.drawable.ic_launcher*",
"R.string.wt_dc_*",
// for fabric
"R.string.com.crashlytics.*",
// for firStore
"R.string.project_id",
"R.id.public_toolbar*",
// Huawei push
"R.string.hms_update_title",
// for umeng
"R.anim.umeng*",
"R.string.umeng*",
"R.string.UM*",
"R.string.tb_*",
"R.layout.umeng*",
"R.layout.socialize_*",
"R.layout.*messager*",
"R.layout.tb_*",
"R.color.umeng*",
"R.color.tb_*",
"R.style.*UM*",
"R.style.umeng*",
"R.drawable.umeng*",
"R.drawable.tb_*",
"R.drawable.sina*",
"R.drawable.qq_*",
"R.drawable.tb_*",
"R.id.umeng*",
"R.id.*messager*",
"R.id.progress_bar_parent",
"R.id.socialize_*",
"R.id.webView",
// for google-services.json
"R.string.google_app_id",
"R.string.gcm_defaultSenderId",
"R.string.default_web_client_id",
"R.string.ga_trackingId",
"R.string.firebase_database_url",
"R.string.google_api_key",
"R.string.google_crash_reporting_api_key",
// for 个推
"R.drawable.push",
"R.drawable.push_small",
"R.layout.getui_notification",
// for 极光推送
"R.drawable.jpush_notification_icon",
// for 融云
"R.drawable.u*",
"R.drawable.rc_*",
"R.string.rc_*",
"R.layout.rc_*",
"R.color.rc_*",
"R.id.rc_*",
"R.style.rc_*",
"R.dimen.rc_*",
"R.array.rc_*",
// for GrowingIO
"R.string.growingio_project_id",
"R.string.growingio_url_scheme",
"R.string.growingio_channel"
]
sevenzip {
artifact = "com.tencent.mm:SevenZip:${ANDRESGUARD_VERSION}"
//path = "/usr/local/bin/7za"
}
/**
* Optional: if finalApkBackupPath is null, AndResGuard will overwrite final apk
* to the path which assemble[Task] write to
**/
// finalApkBackupPath = "${project.rootDir}/final.apk"
/**
* Optional: Specifies the name of the message digest algorithm to user when digesting the entries of JAR file
* Only works in V1signing, default value is "SHA-1"
**/
// digestalg = "SHA-256"
}