问题描述
我要排除来自ProGuard的一些文件路径。示例 com.myapp.customcomponents
我怎样才能做到这一点?我讨厌被放置-keep标志为每一个自定义组件文件,我有这个目录中。
我曾尝试以下,但它不工作:
-keep公共类com.myapp.customcomponents。*
您不要用什么方式这是行不通的规定。你的配置使所有的公共类的名称指定包中:
-keep公共类com.myapp.customcomponents。*
下面的配置保持所有公共类指定的包及其子包的名称:
-keep公共类com.myapp.customcomponents。**
下面的配置保存所有的公共/保护类/场/指定的包的方法及其子包的名称:
-keep公共类com.myapp.customcomponents。** {
公众保护*;
}
I want to exclude some file paths from ProGuard. Example com.myapp.customcomponents
How can I do this? I hate to be placing -keep flags for every single custom component file I have in this directory.
I have tried the following but it doesn't work:
-keep public class com.myapp.customcomponents.*
You don't specify in what way it doesn't work. Your configuration keeps the names of all public classes in the specified package:
-keep public class com.myapp.customcomponents.*
The following configuration keeps the names of all public classes in the specified package and its subpackages:
-keep public class com.myapp.customcomponents.**
The following configuration keeps the names of all public/protected classes/fields/methods in the specified package and its subpackages:
-keep public class com.myapp.customcomponents.** {
public protected *;
}
这篇关于如何保持/排除特定包路径使用ProGuard的时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!