Custom gradle task extending the 'War' task does not see some required classes

This is related to the problem I posted at:

http://stackoverflow.com/questions/16408102/custom-gradle-task-extending-the-war-task-does-not-see-some-required-classes

I’ve created a simple isolated sample (a 4K zip file, if someone wants to get it directly), but I did create these on gist: https://gist.github.com/anonymous/5533941

Just tried with Gradle 1.6 as well - no change.

sample.zip available from:

http://wikisend.com/download/241430/sample.zip

Note that this problem is more general in nature and perhaps not limited to this particular task class - the question really is what truly is the classpath of custom tasks and how to control it? How to add references to libs coming from/with Gradle itself?

As for what the true intent of the original implementation of the task is - it is to create an enhanced WAR file that for each relevant static content (name).(ext) file inside it creates a separate (name).(ext).gz entry if that is deemed beneficial. See:

http://wiki.eclipse.org/Jetty/Feature/GZIP_Compression#Static_Content

http://serverfault.com/questions/279057/how-can-i-enable-gzip-compression-in-jetty

In my case I can’t use a war plugin either because a single war is created from multiple projects.