本地 类 的 Proguard 规则
Proguard Rules for local classes
我想知道
是什么意思
-ignorewarnings
-keep class * {
public private *;
}
-keep class * {
public private protected *;
}
如果我的代码中有一些模型 类 有一些原始类型和 getter setter 怎么办。我不想特别混淆那些名字 "keys" 我应该为他们使用什么规则?
ProGuard
also optimizes the bytecode, removes unused code
instructions, and obfuscates the remaining classes, fields, and
methods with short names.
-keep public class packageName.ParticularClassName.** { *; }
@Keep
annotation to the code you want to keep. Adding @Keep
on a class
keeps the entire class as-is. Adding it on a method or field will keep
the method/field (and it's name) as well as the class name intact.
我想知道
是什么意思-ignorewarnings
-keep class * {
public private *;
}
-keep class * {
public private protected *;
}
如果我的代码中有一些模型 类 有一些原始类型和 getter setter 怎么办。我不想特别混淆那些名字 "keys" 我应该为他们使用什么规则?
ProGuard
also optimizes the bytecode, removes unused code instructions, and obfuscates the remaining classes, fields, and methods with short names.
-keep public class packageName.ParticularClassName.** { *; }
@Keep
annotation to the code you want to keep. Adding@Keep
on a class keeps the entire class as-is. Adding it on a method or field will keep the method/field (and it's name) as well as the class name intact.