shwenzhang / AndResGuard

proguard resource for Android by wechat team
Apache License 2.0
8.54k stars 1.54k forks source link

怎么在白名单里添加配置,让res下的某个文件夹名不被混淆 #132

Closed szhangbiao closed 7 years ago

szhangbiao commented 7 years ago

怎么在白名单里添加配置,让res下的某个文件夹名不被混淆 比如我想让drawable这个文件夹不被重命名 比如这句 res/drawable -> r/f该怎么处理

simpleton commented 7 years ago

配置成res/drawable -> res/drawable即可。

szhangbiao commented 7 years ago

我是想配置成res/drawable -> res/drawable 关键在whiteList里怎么添加配置

simpleton commented 7 years ago

@shizhangbiao whiteList和mapping是2个维度的白名单配置,whiteList只能保证名字不会混淆,而mapping是保证路径的,你可以copy生成的mapping,做为参数传入

andResGuard {
    mappingFile = file("./resource_mapping.txt")
}
szhangbiao commented 7 years ago

好的,晓得了,谢谢