mirror of
https://github.com/HighCapable/KavaRef.git
synced 2026-02-04 12:16:58 +08:00
docs: update r8-proguard
This commit is contained in:
@@ -3,4 +3,15 @@
|
||||
> In most scenarios, Android application installation packages can reduce size through obfuscation.
|
||||
> Here is a configuration method for obfuscation rules.
|
||||
|
||||
`KavaRef` does not require any additional configuration of obfuscation rules in Android projects.
|
||||
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.
|
||||
|
||||
```
|
||||
-keepattributes Signature
|
||||
```
|
||||
|
||||
`TypeRef` has been annotated with `Keep`. If it doesn't work, please manually add the following rules to keep the class.
|
||||
|
||||
```
|
||||
-keep class com.highcapable.kavaref.extension.TypeRef {*;}
|
||||
-keep class,allowobfuscation * extends com.highcapable.kavaref.extension.TypeRef
|
||||
```
|
||||
@@ -2,4 +2,15 @@
|
||||
|
||||
> 大部分场景下 Android 应用程序安装包可通过混淆压缩体积,这里介绍了混淆规则的配置方法。
|
||||
|
||||
`KavaRef` 在 Android 项目中不需要额外配置任何混淆规则。
|
||||
如果你使用了 [kavaref-extension](../library/kavaref-extension) 模块,并使用了其中的 `TypeRef` 功能,请在你的 `proguard-rules.pro` 文件中添加以下规则。
|
||||
|
||||
```
|
||||
-keepattributes Signature
|
||||
```
|
||||
|
||||
`TypeRef` 已添加 `Keep` 注解,如果无效,请手动添加以下规则以保留类。
|
||||
|
||||
```
|
||||
-keep class com.highcapable.kavaref.extension.TypeRef {*;}
|
||||
-keep class,allowobfuscation * extends com.highcapable.kavaref.extension.TypeRef
|
||||
```
|
||||
Reference in New Issue
Block a user