如何混淆只有几级或单包? [英] How to obfuscate only few class or a single package?
问题描述
我不会混淆我的所有项目,但只是大多是重点班。 如何写ProGuard的文件,排除所有的项目和混淆只有一个班或一个包?
I would not obfuscate all my project but just the mostly key class. how to write the proguard file to exclude all project and obfuscate only a single class or a single package ?
推荐答案
请阅读downvote之前的答案。你需要 !前类。
Please read the answer before downvote. You need ! before your class.
看看 Proguard的手册:保存选项
部分,的Android例如。
例如:
-keeppackagenames com.vtcmobile {
! com.yourpackage.CategoryParser // keep package com.vtcmobile excluded class com.vtcmobile.CategoryParser
}
编辑:用
-keeppackagenames [package_filter] 指定不进行模糊处理指定的包名。可选的过滤器是一个逗号分隔的包名称列表。包名可以 包含哪些内容?,*,**和通配符,而且他们可以通过pceded $ P $! 否定符的。只有混淆时适用。
-keeppackagenames [package_filter] Specifies not to obfuscate the given package names. The optional filter is a comma-separated list of package names. Package names can contain ?, *, and ** wildcards, and they can be preceded by the ! negator. Only applicable when obfuscating.
这篇关于如何混淆只有几级或单包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!