On Mon, 2009-03-23 at 07:23 +1100, Adam Murdoch wrote: > This is Gradle telling you that you haven't specified a version of > Groovy. We (obviously) need to make this behaviour better, either with a > more informative error message, or by defaulting to a particular Groovy > version, or figuring out the version based on what's in your compile > classpath.
I think that given that there must be a Groovy installed -- either
directly because of the Gradle installation or because the packagers
have created a dependency, then there should clearly be a default. I
think the order is clear as well:
version specified in the Gradle script
version in GROOVY_HOME environment variable
default system Groovy home (/usr/share/groovy for Debian and Ubuntu.)
> Just a guess, but this looks like the groovy 1.6 classes are ending up
> in the compile classpath, and are being picked up by the compiler in
> preference to the source. Which means if the classes have changed in
> 1.7, then you will see errors like the above.
I think this is right -- that version 1.6 is being used for some things
and version 1.7-beta-1-SNAPSHOT (i.e. the version in GROOVY_HOME) for
others. If true, it would indicate that there is an inconsistency in
what Gradle is doing here: in some places it is using the specified
version and in some places it is using the version used to underpin
Gradle itself.
> Some things to try in your build file (I've not tested these):
>
> - Change the 'compile' configuration to not extend from the 'groovy'
> configuration:
>
> dependencies {
> compile.extendsFrom = [] as Set
> }
Adding this made no difference.
> - Tell the compiler to prefer source of classes:
>
> compile.options.forkOptions.jvmargs = ['-Xprefer:source']
This caused a very different error:
A problem occurred evaluating root project 'Trunk'.
Cause: No such property: options for class:
org.gradle.api.internal.artifacts.DefaultConfigurationResolver
--
Russel.
============================================================
Dr Russel Winder Partner
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip:
sip:[email protected]
London SW11 1EN, UK. m: +44 7770 465 077 xmpp: [email protected]
signature.asc
Description: This is a digitally signed message part
