Hi Eric:
Great tool. Any plan to externalize the keep tags from the Proguard.ant task? My objective is to keep the Ant build file small and maintainable. I liked the example of proguard.xml but our keep tags are quite large. Perhaps, introduce a keep tag for inputting a file containing all the keep tags.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this is already possible. You can include a normal proguard configuration file via
<proguard configuration="myconfigfile.pro"/>
This is described in the section 'Continuing to use a ProGuard configuration file' of the ant task description in the manual.
/Dirk
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-08-06
Hi Dirk:
Perhaps, let me restate my question. Currently, the syntax of "myconfigfile.pro" contains the physical location of the jar files and the list of keep tags describing the list of java identifiers. It would be nice to separate the two so that I would specify the location of the jar files thru Ant (embedded)with the normal ${jar.dir} and specify the -keepTagFile ${cur.dir}myconfigfile.xml
The reason for such is that the location of the jar files depends on how the ant build file is configured. And, the list of keep is currently quite big because of legacy codes.
Or, allow environment variable as the part of the syntax on myconfigfile.pro.
Thanks for your response
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The use of a proguard configuration file does not mean that you aren't allowed to add settings in your build file.
Have a look at the description of the configuration parameter.
That way it is possible to have the jars in the build file and the keep tags in myconfigfile.pro.
/Dirk
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-08-07
Dirk:
I tried that earlier with 1.6.2 and got build failure.
proguard:
[proguard] ProGuard, version 1.6
BUILD FAILED
java.lang.NullPointerException
at java.util.ArrayList.addAll(ArrayList.java:418)
at proguard.ant.AntProGuardOptions.merge(AntProGuardOptions.java:163)
at proguard.ant.ProGuardTask.mergeWithConfigFile(ProGuardTask.java:638)
at proguard.ant.ProGuardTask.execute(ProGuardTask.java:592)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
With 1.7.2, it completes without any problem.
As I said earlier, great tool.
Thanks for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Eric:
Great tool. Any plan to externalize the keep tags from the Proguard.ant task? My objective is to keep the Ant build file small and maintainable. I liked the example of proguard.xml but our keep tags are quite large. Perhaps, introduce a keep tag for inputting a file containing all the keep tags.
Thanks
Hi,
this is already possible. You can include a normal proguard configuration file via
<proguard configuration="myconfigfile.pro"/>
This is described in the section 'Continuing to use a ProGuard configuration file' of the ant task description in the manual.
/Dirk
Hi Dirk:
Perhaps, let me restate my question. Currently, the syntax of "myconfigfile.pro" contains the physical location of the jar files and the list of keep tags describing the list of java identifiers. It would be nice to separate the two so that I would specify the location of the jar files thru Ant (embedded)with the normal ${jar.dir} and specify the -keepTagFile ${cur.dir}myconfigfile.xml
The reason for such is that the location of the jar files depends on how the ant build file is configured. And, the list of keep is currently quite big because of legacy codes.
Or, allow environment variable as the part of the syntax on myconfigfile.pro.
Thanks for your response
The use of a proguard configuration file does not mean that you aren't allowed to add settings in your build file.
Have a look at the description of the configuration parameter.
That way it is possible to have the jars in the build file and the keep tags in myconfigfile.pro.
/Dirk
Dirk:
I tried that earlier with 1.6.2 and got build failure.
proguard:
[proguard] ProGuard, version 1.6
BUILD FAILED
java.lang.NullPointerException
at java.util.ArrayList.addAll(ArrayList.java:418)
at proguard.ant.AntProGuardOptions.merge(AntProGuardOptions.java:163)
at proguard.ant.ProGuardTask.mergeWithConfigFile(ProGuardTask.java:638)
at proguard.ant.ProGuardTask.execute(ProGuardTask.java:592)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
With 1.7.2, it completes without any problem.
As I said earlier, great tool.
Thanks for your help.