03 libdoc Task
The task libdoc generates keyword library documentation from sources of the following type:
- provided keyword libraries like BuiltIn
- keyword libraries implemented in Java
- keyword libraries implemented as resources
- keyword libraries implemented in Python
By adding the following line to the gradle script, documentation for all provided libraries will be generated and stored under build/libdoc.
libdoc.addAllProvided()
By setting the task property outputdir the directory where the generated documentation will be stored can be changed. The provided path can be relative to the project root. The following will store the library documentation under robot-indices:
libdoc.outputdir = 'robot-indices'
The libdoc task can scan the classpath for Java based keyword libraries and generates documentation for all libraries found. This can be enabled by the following line:
libdoc.addAllJavaLibsFromClasspath()
The libdoc task scans directories for resource based keyword libraries. For all files with the extension .robot a html documentation file will be generated. With the following line the directory resources will be scanned for keyword libraries:
libdoc.addAllResourcesFromDirectory('resources')