使用属性打开/关闭 Proguard [英] Turning Proguard On/Off Using Properties
问题描述
在我的 project.properties 文件中有一个属性 proguard.config,当我运行 ant 时它会运行 proguard.以下所有情况都会导致 proguard 运行
In my project.properties file there is a property proguard.config and when i run ant it will run proguard. All of the following will cause proguard to run
proguard.config
proguard.config=
proguard.config=proguard.cfg
属性文件中是否有打开/关闭 proguard 的方法?
Is there a way within the properties file to turn proguard on/off?
否则我将需要编写一个脚本来添加/删除或重命名 proguard.config 属性来控制它.我宁愿只是获取/设置属性.我想要最好的解决方案.现在我正在编写 replaceregexpr 代码以将 proguard.config 重命名为其他内容以关闭.正在寻找更好的解决方案并想知道其他人是如何控制它的?
Otherwise I am going to need to write a script to add/remove or rename the proguard.config property to control this. I would rather just get/set properties. I want the best solution for this. Right now I am coding replaceregexpr to rename the proguard.config to something else to turn off. Looking for a better solution and would like to know how others are controlling this?
推荐答案
更简单的方法是只需要一行
A lot simpler way is to just have the line
#proguard.config=proguard.cfg
或者甚至更好地仍然完全不使用它!这样 proguard 就不会运行了.
or even better still leave it out altogether! That way proguard doesn't run at all.
这篇关于使用属性打开/关闭 Proguard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!