Skip to content

03 libdoc Task

cthiele42 edited this page Jun 13, 2016 · 3 revisions

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

Generating documentation for all provided libraries

By adding the following line to the gradle script, documentation for all provided libraries will be generated and stored under build/libdoc.

libdoc.addAllProvided()

Changing the output directory

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'

Generating documentation for all Java based libraries found on classpath

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()

Generating documentation from resources

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')