On Jul 31, 2008, at 1:07 PM, Hans Dockter wrote:
On Jul 31, 2008, at 12:09 PM, Adam Murdoch wrote:
Hi,
How do I rebuild gradlew? I've made some changes to the groovy
plugin to add a groovydoc task. However, I can't use this task in
gradle's build without rebuilding gradlew with my changes in it
(or at least, I think that's the case)
Why do you use gradlew and not gradle?
In my environent the bin directory of the gradle distribution
installed by the 'gradle install' task is in my path. This way a
'gradle install' updates the gradle distribution used on my system.
gradlew is part of the Gradle wrapper. See also UG chapter 16
(although the logic has slightly changed in 0.3). gradlew,
gradlew.exe and gradle-wrapper.jar is generated by executing
'gradle wrapper'. Those three generated files are then submitted to
svn.
The wrapper task is configured in Gradle's build.gradle.
The purpose of the gradle wrapper and its scripts is to build
projects with Gradle without having to install Gradle first (for
example on CI servers). The gradlew script always runs against a
certain version of Gradle. This version is specified in the
configuration of the wrapper task and baked into the generated
wrapper artifacts. The Gradle distribution with this version is
either downloaded when executing gradlew the first time, or can be
in svn (which is the way Gradle uses the Gradle wrapper. See the
wrapper dir). After the wrapper distribution is available it is
unpacked and gradlew simply delegates to the gradle command of this
wrapper distribution.
Sometimes we have a hen-egg problem. This is when you change Gradle
and/or its build.gradle script in a way, that the new Gradle can't
be build with an older state of Gradle. In such a case I use my IDE
to run the Gradle build and install a new distribution.
The gradle build is often early adopter of new features. In such a
case we have to build a snapshot dist locally, rename the existing
one with the new version. Overwrite the existing one with the new
dist. Change the version number of the wrapper in the build script.
Trigger the warpper task. Submit the new dist and the new wrapper
artifacts to svn. That way any user can easily checkout Gradle and
build it via gradlew.
Although this is always quite a bit of work, the fact that we build
Gradle with Gradle is so valuable and of course fun that I happily
accept some inconveniences due to hen-egg problems.
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email