Skip to content

Commit 30e2bd2

Browse files
committed
docs: update r8-proguard
1 parent ac678ae commit 30e2bd2

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

docs-source/src/en/config/r8-proguard.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,15 @@
33
> In most scenarios, Android application installation packages can reduce size through obfuscation.
44
> Here is a configuration method for obfuscation rules.
55
6-
`KavaRef` does not require any additional configuration of obfuscation rules in Android projects.
6+
If you are using the [kavaref-extension](../library/kavaref-extension) module and using the `TypeRef` feature, please add the following rule to your `proguard-rules.pro` file.
7+
8+
```
9+
-keepattributes Signature
10+
```
11+
12+
`TypeRef` has been annotated with `Keep`. If it doesn't work, please manually add the following rules to keep the class.
13+
14+
```
15+
-keep class com.highcapable.kavaref.extension.TypeRef {*;}
16+
-keep class,allowobfuscation * extends com.highcapable.kavaref.extension.TypeRef
17+
```

docs-source/src/zh-cn/config/r8-proguard.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,15 @@
22

33
> 大部分场景下 Android 应用程序安装包可通过混淆压缩体积,这里介绍了混淆规则的配置方法。
44
5-
`KavaRef` 在 Android 项目中不需要额外配置任何混淆规则。
5+
如果你使用了 [kavaref-extension](../library/kavaref-extension) 模块,并使用了其中的 `TypeRef` 功能,请在你的 `proguard-rules.pro` 文件中添加以下规则。
6+
7+
```
8+
-keepattributes Signature
9+
```
10+
11+
`TypeRef` 已添加 `Keep` 注解,如果无效,请手动添加以下规则以保留类。
12+
13+
```
14+
-keep class com.highcapable.kavaref.extension.TypeRef {*;}
15+
-keep class,allowobfuscation * extends com.highcapable.kavaref.extension.TypeRef
16+
```

0 commit comments

Comments
 (0)