On Oct 6, 2008, at 11:32 PM, Adam Murdoch wrote:
Hans Dockter wrote:
On Sep 27, 2008, at 1:34 AM, Adam Murdoch wrote:
So, I'm not sure what to do with this now. I don't really
understand the purpose of executeIsolatedAntScript() so I can't
really suggest (or implement) any solutions yet. I guess that
strictly speaking, the classpath of the isolated ant script
should be as minimal as possible. This means probably just ant
and groovy and nothing else
The Groovyc Ant task (as well as the Groovydoc task) is part of
the groovy distribution. We want to make it possible for Groovy
projects to use a different version of Groovyc and Groovycdoc then
the ones contained in the groovy version shipped with Gradle. In
particular for Groovyc this is very important for people using
some new features of Groovy 1.6. You could not compile them with
Groovyc 1.5.
Do you mean use a different version of groovy for their source, or
for their build files, or both? How do you specify that you want to
use a different version of groovy?
For their sources. See user's guide, beginning of chapter 10.
I went without success through the Ant Classloader hell before I
implemented the current solution. It is obviously very handcrafted.
I don't understand how this works. It looks like the isolated ant
script is still going to be picking up groovy from gradle's lib dir.
It is picked up but has no precedence as the loaderClasspath
parameter of the executeIsolatedAntScript method contains the user
defined groovy version and is higher in the classpath. In the case of
a compile this loaderClasspath property gets its content from the
getGroovyClasspath property of GroovyCompile. This again is assigned
in the GroovyPlugin. Obviously this code is confusing. The
groovyproject integration test, tests this behavior.
- Hans
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email