Dean Schulze wrote:
Andreas,
I had the same question you did after reading the first several
chapters of the User's Guide. I recently posted my question on this list.
What the User's Guide doesn't explain is that Gradle is a
convention-based build system. The gradle build examples that come
with the distribution are surprisingly short. They don't need to
declare many of the things that you would declare with Ant because
they follow the gradle (Maven2) convention. It's built into gradle
and the Java Plugin by default.
The problem comes when you have to adapt gradle to an existing project
strucure. You're faced with re-defining the conventions that gradle
expects. Others have told me that it's not that difficult to do, but
I haven't had time to try it so far.
The User's Guide needs to be re-written.
Re-written? Wow. Why do you think that? How would you suggest we
structure it differently? What questions did you have that it did not
answer? If you have any ideas, you could help out by adding them to the
wiki at http://docs.codehaus.org/display/GRADLE/User+guide
From your comments so far, it seems like all the user guide has to do
is explain that Gradle provides an optional Java plugin, which you can
use to build a JAR from a Java project if you want. This plugin takes
care of the work of compiling, testing and JARing your project for you,
and it uses some default locations to find source and tests and various
other things (AKA the convention), all of which you can change if you
like. If you want to use the convention, you don't need to do anything
at all in your build file. If you don't want to use the convention, you
need to tell Gradle where various things are by settings some
properties. Oh, and here's an example asking the plugin to look for
source under src/ and the tests under src/test.
Would that do?
It just leaves you scratching your head the way it is now. It also
needs to show how to re-define the Java Plugin for the various ways
that existing Java/J2EE projects are structured.
That problem is, the examples are structured how pretty much every Java
project I've ever worked on have been structured. So, you're going to
have to help us out here. We can't write about what we don't know. How
are your Java/J2EE project different to our examples? Is it simply that
the source is under src/ and the tests are under src/tests? Or is there
something else?
Good luck.
--- On *Thu, 6/4/09, Andreas Jöcker /<[email protected]>/*
wrote:
From: Andreas Jöcker <[email protected]>
Subject: [gradle-user] A naive question
To: [email protected]
Date: Thursday, June 4, 2009, 1:20 AM
Hi all,
I'm just started to get to know to gradle and would like to use it
more
heavily in our projects.
I read the wonderful User's guide but what I miss is a simple
build file
example (or was I too blind to see it ?)
The user guide shows nicely several parts of a building system, but a
simple example would be nice.
Can anyone point me to something or give me an example of a simple
build
file in gradle, which e.g. has dependencies, compiles, builds a jar /
war or whatever.
I just want to see some real file to see the syntax working....
Thanks for that
Andreas
--
Andreas Jöcker
GiS - Gesellschaft für integrierte Systemplanung mbH
Junkersstr. 2
69469 Weinheim
E-Mail [email protected]
</mc/[email protected]>
Telefon +49 6201 503-59
Fax +49 6201 503-66
Gesellschaft für integrierte Systemplanung mbH
Geschäftsführer: Eckhard Haffmann, Alfred Gai, Bernd Heselmann
Sitz der Gesellschaft: Zeppelinstr. 11 - 91052 Erlangen
Amtsgericht Fürth/Bayern - Handelsregister-Nr. HRB 3435
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email