buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Khristian Schönrock <>
Subject Proguard and Ant Task
Date Fri, 05 Apr 2013 14:47:17 GMT
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',
    ant.proguard :configuration=>_('../build/'), # config
      :injars=>project('my_project') # snag here

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
- Since "-injars" is part of the configuration, in the Proguard Ant task it
can be defined either in the configuration file (""), 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,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message