Sorry for the delay; I was traveling, and then this task fell down my list a bit once I returned.
My answer is a bit complicated. I tried again with this snapshot:
groovy-all-1.8.1-SNAPSHOT.jar 19-Jul-2011 08:44 5.8M
With my sample project, everything worked fine. (I assume you tried it, too, so no surprise there!)
With the actual production code, I find the following:
1. With groovy 1.8.0, I still get this error. (That's expected, of course, but confirms I've reproduced it correctly.)
2. With groovy 1.8.1 in the taskdef, but with 1.8.0 still in my classpath (along with 1.8.1), I still get the error.
3. With groovy 1.8.0 totally removed, I get lots of other errors instead. They all have to do with lines like the following:
List<DomNode> getByXPath(String xpathExpression)
(where DomNode is a java class, and the class with the compilation error is a groovy class, and specifically, the java stub from it).
I gave up on getting rid of those errors, though I tried for a while. (First I removed packages that seemed to have a lot of the errors, and I removed references to those packages, but then more popped up. Thus, giving up.)
I guess that means I should report the errors I'm getting when I use just the 1.8.1 snapshot for compiling. (I assume that if something make it into a snapshot, it's worth reporting. Is that correct?) Which, in turn, means seeing whether someone else has reported it, which might mean waiting until tomorrow.