gradlegroovydoc

How to set character encoding for Groovydoc in Gradle?


I have Groovy code with UTF-8 encoding and need the generated Groovydoc HTML to use the same. But how do I configure this in Gradle?


Solution

  • The Groovydoc tool, and hence also Gradle's Groovydoc task, doesn't currently support an encoding option. Setting the file.encoding system property for the Gradle JVM should work though. You can do this via the GRADLE_OPTS environment variable, or by adding systemProp.file.encoding=utf-8 to gradle.properties.