-
public final class LibdocRobotConfiguration extends CommonRobotConfiguration
Class that stores
libdocconfiguration and maps it to the command line arguments.outputFile The name for the output file. Documentation output format is deduced from the file extension.
libraryOrResourceFile Name or path of the documented library or resource file. Supports ant-like pattern format to match multiple inputs, such as
src/java/**/*.javaName must be in the same format as when used in Robot Framework test data, for exampleBuiltInorcom.acme.FooLibrary. When name is used, the library is imported the same as when running the tests. Use extraPathDirectories to set PYTHONPATH/CLASSPATH accordingly.Paths are considered relative to the location of build script and must point to a valid Python/Java source file or a resource file. For example `src/main/python/test/ExampleLib.py` Note that you should preferably import java classes by classname, not path. Dynamic libraries will not be compiled correctly with path.
outputDirectory Specifies the directory where documentation files are written. Considered relative to the
${basedir}of the project, but also supports absolute paths. Defaults to${project.build.directory}/robotframework/libdocname Sets the name of the documented library or resource.
version Sets the version of the documented library or resource.
additionalPythonPaths Additional locations where to search for libraries and resources. E.g.:
src/main/java/com/test/
Example 1:
libdoc { outputFile = MyLib.html libraryOrResourceFile = "com.mylib.MyLib" }Example 2:
libdoc { outputFile = "MyLib.xml" libraryOrResourceFile = "src/java/**/*Lib.java" }Example 3:
libdoc { outputFile = "MyLib.libspec" libraryOrResourceFile = "com.**.*Lib" }
-
-
Field Summary
Fields Modifier and Type Field Description private Property<String>formatprivate Property<String>specDocFormatprivate Property<String>docFormatprivate Property<String>versionprivate Property<Boolean>quiteprivate DirectoryPropertyoutputDirectoryprivate RegularFilePropertyoutputFileprivate StringlibraryOrResourceFileprivate final Property<String>nameprivate ConfigurableFileCollectionadditionalPythonPaths
-
Constructor Summary
Constructors Constructor Description LibdocRobotConfiguration(Project project)
-
Method Summary
Modifier and Type Method Description final Property<String>getFormat()Specifies whether to generate an HTML output for humans or a machine readable spec file in XML or JSON format. final UnitsetFormat(Property<String> format)Specifies whether to generate an HTML output for humans or a machine readable spec file in XML or JSON format. final Property<String>getSpecDocFormat()Specifies the documentation format used with XML and JSON spec files. final UnitsetSpecDocFormat(Property<String> specDocFormat)Specifies the documentation format used with XML and JSON spec files. final Property<String>getDocFormat()Specifies the source documentation format. final UnitsetDocFormat(Property<String> docFormat)Specifies the source documentation format. final Property<String>getVersion()Sets the version of the documented library or resource. final UnitsetVersion(Property<String> version)Sets the version of the documented library or resource. final Property<Boolean>getQuite()Do not print the path of the generated output file to the console. final UnitsetQuite(Property<Boolean> quite)Do not print the path of the generated output file to the console. final DirectoryPropertygetOutputDirectory()Specifies the directory where documentation files are written. final UnitsetOutputDirectory(DirectoryProperty outputDirectory)Specifies the directory where documentation files are written. final RegularFilePropertygetOutputFile()Specifies the filename of the created documentation. final UnitsetOutputFile(RegularFileProperty outputFile)Specifies the filename of the created documentation. final StringgetLibraryOrResourceFile()Name of the library or path to the resource file. final UnitsetLibraryOrResourceFile(String libraryOrResourceFile)Name of the library or path to the resource file. final Property<String>getName()Sets the name of the documented library or resource. final ConfigurableFileCollectiongetAdditionalPythonPaths()Additional locations where to search for libraries and resources. final UnitsetAdditionalPythonPaths(ConfigurableFileCollection additionalPythonPaths)Additional locations where to search for libraries and resources. final List<Arguments>generateRunArguments()-
-
Method Detail
-
getFormat
final Property<String> getFormat()
Specifies whether to generate an HTML output for humans or a machine readable spec file in XML or JSON format. The
libspecformat means XML spec with documentations converted to HTML. The default format is got from the output file extension.Valid values:
HTML
XML
JSON
LIBSPEC
-
setFormat
final Unit setFormat(Property<String> format)
Specifies whether to generate an HTML output for humans or a machine readable spec file in XML or JSON format. The
libspecformat means XML spec with documentations converted to HTML. The default format is got from the output file extension.Valid values:
HTML
XML
JSON
LIBSPEC
-
getSpecDocFormat
final Property<String> getSpecDocFormat()
Specifies the documentation format used with XML and JSON spec files.
rawmeans preserving the original documentation format andhtmlmeans converting documentation to HTML. The default israwwith XML spec files andhtmlwith JSON specs and when using the speciallibspecformat.Valid values:
RAW
HTML
-
setSpecDocFormat
final Unit setSpecDocFormat(Property<String> specDocFormat)
Specifies the documentation format used with XML and JSON spec files.
rawmeans preserving the original documentation format andhtmlmeans converting documentation to HTML. The default israwwith XML spec files andhtmlwith JSON specs and when using the speciallibspecformat.Valid values:
RAW
HTML
-
getDocFormat
final Property<String> getDocFormat()
Specifies the source documentation format. Possible values are Robot Framework's documentation format, HTML, plain text, and reStructuredText. The default value can be specified in library source code and the initial default value is
ROBOT.Valid values:
ROBOT
HTML
TEXT
REST
-
setDocFormat
final Unit setDocFormat(Property<String> docFormat)
Specifies the source documentation format. Possible values are Robot Framework's documentation format, HTML, plain text, and reStructuredText. The default value can be specified in library source code and the initial default value is
ROBOT.Valid values:
ROBOT
HTML
TEXT
REST
-
getVersion
final Property<String> getVersion()
Sets the version of the documented library or resource.
Default-value: project.version
-
setVersion
final Unit setVersion(Property<String> version)
Sets the version of the documented library or resource.
Default-value: project.version
-
getQuite
final Property<Boolean> getQuite()
Do not print the path of the generated output file to the console.
-
setQuite
final Unit setQuite(Property<Boolean> quite)
Do not print the path of the generated output file to the console.
-
getOutputDirectory
final DirectoryProperty getOutputDirectory()
Specifies the directory where documentation files are written.
Default-value:
${project.buildDir}/robotdoc/libdoc
-
setOutputDirectory
final Unit setOutputDirectory(DirectoryProperty outputDirectory)
Specifies the directory where documentation files are written.
Default-value:
${project.buildDir}/robotdoc/libdoc
-
getOutputFile
final RegularFileProperty getOutputFile()
Specifies the filename of the created documentation. Considered to be relative to the outputDirectory of the project.
Default-value:
libdoc.html
-
setOutputFile
final Unit setOutputFile(RegularFileProperty outputFile)
Specifies the filename of the created documentation. Considered to be relative to the outputDirectory of the project.
Default-value:
libdoc.html
-
getLibraryOrResourceFile
final String getLibraryOrResourceFile()
Name of the library or path to the resource file.
Name must be in the same format as when used in Robot Framework test data, for example
BuiltInorcom.acme.FooLibrary. When name is used, the library is imported the same as when running the tests. Use additionalPythonPaths to set PYTHONPATH/CLASSPATH accordingly.Paths are considered relative to the location of
build.gradleand must point to a valid Python/Java source file or a resource file.Examples
src/main/java/com/test/ExampleLib.java${buildDir}/libs/ExampleLib.jar
One may also use ant-like patterns, for example
src/main/java/com/**/Lib.java
-
setLibraryOrResourceFile
final Unit setLibraryOrResourceFile(String libraryOrResourceFile)
Name of the library or path to the resource file.
Name must be in the same format as when used in Robot Framework test data, for example
BuiltInorcom.acme.FooLibrary. When name is used, the library is imported the same as when running the tests. Use additionalPythonPaths to set PYTHONPATH/CLASSPATH accordingly.Paths are considered relative to the location of
build.gradleand must point to a valid Python/Java source file or a resource file.Examples
src/main/java/com/test/ExampleLib.java${buildDir}/libs/ExampleLib.jar
One may also use ant-like patterns, for example
src/main/java/com/**/Lib.java
-
getAdditionalPythonPaths
final ConfigurableFileCollection getAdditionalPythonPaths()
Additional locations where to search for libraries and resources. e.g. src/main/java/com/test/
-
setAdditionalPythonPaths
final Unit setAdditionalPythonPaths(ConfigurableFileCollection additionalPythonPaths)
Additional locations where to search for libraries and resources. e.g. src/main/java/com/test/
-
generateRunArguments
final List<Arguments> generateRunArguments()
-
-
-
-