Skip to content

Commit

Permalink
docs(readme): add best practise notes in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
simpleton committed Feb 26, 2018
1 parent 48e055f commit 7096beb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ andResGuard {
"*.jpg",
"*.jpeg",
"*.gif",
"resources.arsc"
]
sevenzip {
artifact = 'com.tencent.mm:SevenZip:1.2.11'
Expand Down Expand Up @@ -119,6 +118,12 @@ res path mapping:

1. The first element of list which returned by `AssetManager#list(String path)` is empty string when you're using the APK which is compressed by 7zip. [#162](https://github.com/shwenzhang/AndResGuard/issues/162)

## Best Practise

1. Do **NOT** add `resource.asrc` into `compressFilePattern` unless the app size is really matter to you.(#84 #233
2. Do **NOT** enable 7zip compression(`use7zip`) when you distribute your APP on Google Play. It'll prevent the file-by-file patch when updating your APP(#233


## Thanks

[Apktool](https://github.com/iBotPeaches/Apktool) Connor Tumbleson
Expand Down
7 changes: 6 additions & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ andResGuard {
"*.jpg",
"*.jpeg",
"*.gif",
"resources.arsc"
]
sevenzip {
artifact = 'com.tencent.mm:SevenZip:1.2.11'
Expand Down Expand Up @@ -111,6 +110,12 @@ res path mapping:

1. 当时在使用7zip压缩的APK时,调用`AssetManager#list(String path)`返回结果的首个元素为空字符串. [#162](https://github.com/shwenzhang/AndResGuard/issues/162)

## 最佳实践

1. 如果不是对APK size有极致的需求,请不要把`resource.asrc`添加进`compressFilePattern`#84 #233
2. 对于发布于Google Play的APP,建议不要使用7Zip压缩,因为这个会导致Google Play的优化Patch算法失效(#233


## 致谢

[Apktool](https://github.com/iBotPeaches/Apktool) 使用了Apktool资源解码部分的代码
Expand Down

1 comment on commit 7096beb

@simpleton
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref #233

Please sign in to comment.