ZipException: invalid block type

Hi,

I have no idea how to reproduce this. While I was running test repeatedly, suddenly tests started failing, and verting back to versions of my code which previously worked did not help. Those tests use the gradle-tooling-api.

org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-1.12-bin.zip'.
        at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53)
        at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
        at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
        at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
        at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:114)
        at com.tkruse.gradle.groovysh.SimpleSpecification.import custom class(SimpleSpecification.groovy:22)
          Caused by:
        org.gradle.internal.exceptions.LocationAwareException: java.util.zip.ZipException: invalid block type
              Caused by:
            org.gradle.internal.UncheckedException: java.util.zip.ZipException: invalid block type
                  Caused by:
                java.util.zip.ZipException: invalid block type

I ended up deleting anything in ~/.gradle that looked related to 1.12, and then trying again worked. It would be nice if the error message gave an indication of what file caused this exception.

Folders i deleted:

.gradle/wrapper/dists/gradle-1.12-bin
.gradle/caches/1.12
.gradle/caches/1.12-20140312230025+0000/