On Sun, Nov 29, 2009 at 22:31, Andrew Thorburn <[email protected]> wrote:
Hey folks,

I've currently got a fairly simple project I work on now and then (as
time permits, which isn't often), and I'm looking at converting it to
using Gradle, both to simplify the build script and to learn about
Gradle. Now, Gradle looks pretty nice, by and large, but I'm not
seeing an easy way to convert my project.

The main problem is that the program will, eventually, be moved over
to SWT, and as such I'll need to be preparing one download for each
supported platform. The Ant build script I'm currently using can be
found at http://code.google.com/p/yajdr/source/browse/trunk/yajdr/build.xml

I'm not sure exactly how to say what I'd like, but it basically boils
down to this:

Be able to specify some number of configurations (e.g. windows-32,
windows-64, linux-32, linux-64), extend those configurations off a
base configuration (e.g. compile), and for each of those
configurations generate the following:

A JAR file containing the correct manifest classpath for the configuration.

A lib folder containing the artifacts the configuration provides,
ideally with the base configuration in /lib/, and the other
configuration in /lib/[config]/ (e.g. /lib/windows-32/). This will
obviously affect the manifest classpath.

A ZIP and a tar.gz archive for each configuration, including not only
the built JAR(s), but also the other libraries and any other files
that may be required, but that cannot go in the application's JAR
file, possibly interpolated.

Does that make sense? Is there an easy way to do this at the moment in
Gradle? If not, I'd be happy to try and write a plugin for this
(again, given the time...), but I'm not sure what the best approach
would be...

Thanks,

- Andrew Thorburn

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Sure it's possible.  I don't have a lot of time right now, but you could look 
into task rules, and defining functions to do the common stuff.  It actually 
doesn't seem that difficult to do conceptually.  There may be a bit of grunt 
work that needs to be done though.  I'd do a jar task for each of the 
configurations (just create your own configurations) and a zip task that would 
depend on the jar task and include what's needed.

--
Jason Porter
Real Programmers think better when playing Adventure or Rogue.

PGP key id: 926CCFF5
PGP fingerprint: 64C2 C078 13A9 5B23 7738 F7E5 1046 C39B 926C CFF5
PGP key available at: keyserver.net, pgp.mit.edu

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to