> You might think about using the wrapper for this. This would lock down
> the Gradle version. You could tweak the wrapper script to point to the
> appropriate JDK. For everything else you can declare the appropriate
> versions in the build script.
I think the wrapper is not the appropriate choice for me. I really wouldn't
want to check Gradle into version control. And I don't like changing a script
that might be overwritten when someone executes the wrapper task again.
Here is a quick summary of what my build tool installation does:
- Provide all versions of all build tools (Gradle, Ant libraries, JDK and
Jython) for all platforms, so developers do not have to install each tool
separately, and we can be sure everybody uses the same tools.
- Wrap Gradle with a very thin wrapper (a batch file containing only 25 lines
of simple code) to set up the PATH environment variable, ensure other
environment variables are correct (because tools started using Gradle may look
at them), and start the Gradle build with the correct JDK.
- Use a project-specific properties file (checked into version control) in the
root project, which is read by the wrapper script, to easily configure which
build environment, JDK and Jython versions to use for the project/branch. If
you want to try out another build tool version for a project you only have to
change a couple of values:
BUILDENV_VERSION=trunk
JDK_VENDOR=Oracle
JDK_VERSION=1.6.0_26
JYTHON_VERSION=2.5.2
- Use of non-standard names for the build scripts (e.g.
mycompany-build.gradle), so accidental invocation of Gradle in the directory
won't start a build with whatever the environment of the developer is at that
moment, preventing incorrect build results.
The only thing a developer has to do is to get a copy of the build tool
installation and add the "bin" directory of the wrapper script to his path. The
wrapper script takes care of the rest.
> By doing this, the Eclipse integration (and the upcoming IDEA
> integration) will pick up exactly the same version Gradle, and
> everything declared in the build script.
I will probably run into issues here, but I'll see how it goes. I have not
attempted to run the build from Eclipse yet.
--
Regards, Johan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email