Groovy

Groovy Goodness: Customise Groovydoc Output With Gradle

Posted on by  
Hubert Klein Ikkink

When we write our Groovy application we of course add documentation to our classes. If we use Gradle to build our project we can run the groovydoc task that is added by the Groovy plugin to generate documentation. We can set document and windows titles and a footer for the generated documentation by changing some properties of the groovydoc task. If we want some further customisation we must take some extra steps. The groovydoc task uses the GroovyDoc tool that is bundled with the Groovy library. GroovyDoc tool uses the GStringTemplateEngine to generate the documentation. The default template files are stored in the package org.codehaus.tools.groovydoc.gstringTemplates. The following files are in the package:

└── org
    └── codehaus
        └── groovy
            └── tools
                └── groovydoc
                    └── gstringTemplates
                        ├── classLevel
                        │   └── classDocName.html
                        ├── packageLevel
                        │   ├── package-frame.html
                        │   └── package-summary.html
                        └── topLevel
                            ├── allclasses-frame.html
                            ├── deprecated-list.html
                            ├── help-doc.html
                            ├── index-all.html
                            ├── index.html
                            ├── overview-frame.html
                            ├── overview-summary.html
                            └── stylesheet.css

Continue reading →

shadow-left