-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.md
315 lines (248 loc) · 10.1 KB
/
README.md
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# walle_kit
[![Pub Package](https://img.shields.io/pub/v/walle_kit.svg)](https://pub.dev/packages/walle_kit)
[![License](https://img.shields.io/github/license/RxReader/walle_kit)](https://github.com/RxReader/walle_kit/blob/master/LICENSE)
flutter版walle多渠道打包工具
## 相关工具
* [Flutter版微信SDK](https://github.com/RxReader/wechat_kit)
* [Flutter版腾讯(QQ)SDK](https://github.com/RxReader/tencent_kit)
* [Flutter版新浪微博SDK](https://github.com/RxReader/weibo_kit)
* [Flutter版支付宝SDK](https://github.com/RxReader/alipay_kit)
* [Flutter版深度链接](https://github.com/RxReader/link_kit)
* [Flutter版walle渠道打包工具](https://github.com/RxReader/walle_kit)
## dart/flutter 私服
* [simple_pub_server](https://github.com/rxreader/simple_pub_server)
## docs
* [Meituan-Dianping/walle](https://github.com/Meituan-Dianping/walle)
* [rxreader/qihoo360-jiagu-docker](https://github.com/rxreader/qihoo360-jiagu-docker)
* [rxreader/tencentcloud-legu](https://github.com/rxreader/tencentcloud-legu)
* [移动安全-应用加固命令行工具jar包使用说明](https://cloud.tencent.com/developer/article/1193406)
* [腾讯云·访问管理](https://console.cloud.tencent.com/cam/capi)
* [腾讯云·移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
## Android
> ⚠️ 360不让白嫖党使用CLI
> ⚠️⚠️⚠️ 辣鸡加固服务,全特么翻车 ... 大家伙洗洗睡吧,360加固/腾讯乐固已死 ...
```shell
Failure [-124: Failed parse during installPackageLI: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary]
```
```shell
# 解决方案 - 对 360 加固有效,对腾讯乐固无效(会报错)
zipalign -p -f -v 4 input.apk output.apk
```
* apply
```groovy
// android/app/build.gradle
apply from: "${project(":walle_kit").projectDir}/walle_kit_v3.gradle" // 推荐(非cli方式,不支持360加固、不支持腾讯乐固)
// 或
apply from: "${project(":walle_kit").projectDir}/walle_kit_v2.gradle" // 推荐(非cli方式,不支持360加固、支持腾讯乐固)
// 或
apply from: "${project(":walle_kit").projectDir}/walle_kit.gradle" // 不推荐(cli方式,支持360加固、支持腾讯乐固)
```
* fileNameFormat
```groovy
// appName:
// projectName:
// buildType:
// versionName:
// versionCode:
// packageName:
// flavorName:
// channelId:
```
* channelFile
* [配置文件示例 - channel](example/android/app/channel)
* [配置文件示例 - channel.json](example/android/app/channel.json)
### walle_kit_v3.gradle
> 应用宝上架,已不再强制要求加固
> 用法同 walle_kit_v2.gradle 一致,不同的是已不再支持腾讯乐固功能
### walle_kit_v2.gradle
* without flavors
```groovy
// android/app/build.gradle
walle {
enabled = true
// [访问管理](https://console.cloud.tencent.com/cam/capi)
// [移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
tencent {
secretId = 'xxx'
secretKey = 'xxx'
// region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
channels = ['tencent', 'tencent-alias']
}
outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
channelFile = file('channel')
}
```
```groovy
// android/app/build.gradle
android {
walleConfigs {
release {
enabled = true
// [访问管理](https://console.cloud.tencent.com/cam/capi)
// [移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
tencent {
secretId = 'xxx'
secretKey = 'xxx'
// region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
channels = ['tencent', 'tencent-alias']
}
outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
channelFile = file('channel')
}
}
}
walle {
enabled = false
}
```
* flavors
```groovy
// android/app/build.gradle
android {
productFlavors {
prod {
}
}
walleConfigs {
prod {
enabled = true
// [访问管理](https://console.cloud.tencent.com/cam/capi)
// [移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
tencent {
secretId = 'xxx'
secretKey = 'xxx'
// region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
channels = ['tencent', 'tencent-alias']
}
outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
channelFile = file('channel')
}
}
}
walle {
enabled = false
}
```
### walle_kit.gradle
* without flavors
```groovy
// android/app/build.gradle
walle {
enabled = true
// // https://github.com/rxreader/walle-docker
// jarFile = file('script/walle-cli-all.jar') // 默认:file('script/walle-cli-all.jar')
qihoo360 {
// // https://github.com/rxreader/qihoo360-jiagu-docker
// jiaguJarFile = file('script/jiagu/jiagu.jar') // 默认:file('script/jiagu/jiagu.jar')
account = 'xxx'
password = 'xxx'
channels = ['qihu360', 'qihu360-alias']
}
// [访问管理](https://console.cloud.tencent.com/cam/capi)
// [移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
tencent {
// // https://github.com/rxreader/tencentcloud-legu
// leguJarFile = file('script/legu-all.jar') // 默认:file('script/legu-all.jar')
secretId = 'xxx'
secretKey = 'xxx'
// region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
channels = ['tencent', 'tencent-alias']
}
outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
channelFile = file('channel')
}
```
```groovy
// android/app/build.gradle
android {
walleConfigs {
release {
enabled = true
// // https://github.com/rxreader/walle-docker
// jarFile = file('script/walle-cli-all.jar') // 默认:file('script/walle-cli-all.jar')
qihoo360 {
// // https://github.com/rxreader/qihoo360-jiagu-docker
// jiaguJarFile = file('script/jiagu/jiagu.jar') // 默认:file('script/jiagu/jiagu.jar')
account = 'xxx'
password = 'xxx'
channels = ['qihu360', 'qihu360-alias']
}
// [访问管理](https://console.cloud.tencent.com/cam/capi)
// [移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
tencent {
// // https://github.com/rxreader/tencentcloud-legu
// leguJarFile = file('script/legu-all.jar') // 默认:file('script/legu-all.jar')
secretId = 'xxx'
secretKey = 'xxx'
// region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
channels = ['tencent', 'tencent-alias']
}
outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
channelFile = file('channel')
}
}
}
walle {
enabled = false
}
```
* flavors
```groovy
// android/app/build.gradle
android {
productFlavors {
prod {
}
}
walleConfigs {
prod {
enabled = true
// // https://github.com/rxreader/walle-docker
// jarFile = file('script/walle-cli-all.jar') // 默认:file('script/walle-cli-all.jar')
qihoo360 {
// // https://github.com/rxreader/qihoo360-jiagu-docker
// jiaguJarFile = file('script/jiagu/jiagu.jar') // 默认:file('script/jiagu/jiagu.jar')
account = 'xxx'
password = 'xxx'
channels = ['qihu360', 'qihu360-alias']
}
// [访问管理](https://console.cloud.tencent.com/cam/capi)
// [移动应用安全](https://console.cloud.tencent.com/ms/reinforce/list)
tencent {
// // https://github.com/rxreader/tencentcloud-legu
// leguJarFile = file('script/legu-all.jar') // 默认:file('script/legu-all.jar')
secretId = 'xxx'
secretKey = 'xxx'
// region = 'ap-guangzhou' // 可选:'ap-guangzhou'、'ap-shanghai',默认:'ap-guangzhou'
channels = ['tencent', 'tencent-alias']
}
outputDir = file("${project.buildDir}/outputs/apk/walle") // 默认:file("${project.buildDir}/outputs/apk/${flavorName}/${buildType}/walle")
fileNameFormat = '${appName}-${buildType}-${channelId}.apk' // 默认:'${appName}-${buildType}-${channelId}.apk'
channelFile = file('channel')
}
}
}
walle {
enabled = false
}
```
## Flutter
* snapshot
```yaml
dependencies:
walle_kit:
git:
url: https://github.com/rxreader/walle_kit.git
```
* release
```yaml
dependencies:
walle_kit: ^${latestTag}
```
## Star History
![stars](https://starchart.cc/rxreader/walle_kit.svg)