Hello everyone,
I'm trying to add a proguard task to my project. So far I've not found any
sort of Proguard-addon for Buildr, so I tried using the Ant task.
I tried to mimic the OpenJPA task, and ended up with the following code:
REQUIRES = [ ...bunch of libraries... ]
ant('proguard') do |ant|
ant.taskdef :name=>'proguard', :classname=>'proguard.ant.ProGuardTask',
:classpath=>REQUIRES.join(File::PATH_SEPARATOR)
ant.proguard :configuration=>_('../build/configuration.pro'), # config
file
:injars=>project('my_project') # snag here
end
And so I am left with a bunch of intertwining questions:
- Since I'm defining the task in a project that should be processed by
proguard, I'm not sure how I should add the project to the classpath.
- Moving the proguard task to some other project ("distribution", for
example) solves the problem, but proguard complains that I need to define
the "-injars" parameter, which I tried unsuccessfully with the :injars code
above.
- Since "-injars" is part of the configuration, in the Proguard Ant task it
can be defined either in the configuration file ("configuration.pro"), or
in the body of the <configuration> tag. Supposing the :configuration key
maps to this tag, can I add this "tag content"?
How do I best configure this?
Thanks in advance,
Khristian
|