Thanks Sean, much appreciated. Apparently Groovydoc requires Jansi to print error messages. (In the code above it seems to trip over the multi-catch clause.) However, jansi is only listed as an optional dependency in the groovy-all POM, and therefore transitive dependency resolution will not include it automatically. This answer on the Groovy mailing list has the details: http://groovy.329449.n5.nabble.com/jansi-is-a-hard-dependency-in-groovy-all-td5719856.html#a5719864
It’s worthwhile to investigate whether Gradle’s Groovydoc task can/should compensate for this automatically. I’ve raised GRADLE-3174 for this.