Package 

Class LibdocRobotConfiguration


  • 
    public final class LibdocRobotConfiguration
    extends CommonRobotConfiguration
                        

    Class that stores libdoc configuration 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/**/*.java Name must be in the same format as when used in Robot Framework test data, for example BuiltIn or com.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/libdoc

    • name 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"
        }
    • 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 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.
      final Property<String> getSpecDocFormat() Specifies the documentation format used with XML and JSON spec files.
      final Unit setSpecDocFormat(Property<String> specDocFormat) Specifies the documentation format used with XML and JSON spec files.
      final Property<String> getDocFormat() Specifies the source documentation format.
      final Unit setDocFormat(Property<String> docFormat) Specifies the source documentation format.
      final Property<String> getVersion() Sets the version of the documented library or resource.
      final Unit setVersion(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 Unit setQuite(Property<Boolean> quite) Do not print the path of the generated output file to the console.
      final DirectoryProperty getOutputDirectory() Specifies the directory where documentation files are written.
      final Unit setOutputDirectory(DirectoryProperty outputDirectory) Specifies the directory where documentation files are written.
      final RegularFileProperty getOutputFile() Specifies the filename of the created documentation.
      final Unit setOutputFile(RegularFileProperty outputFile) Specifies the filename of the created documentation.
      final String getLibraryOrResourceFile() Name of the library or path to the resource file.
      final Unit setLibraryOrResourceFile(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 ConfigurableFileCollection getAdditionalPythonPaths() Additional locations where to search for libraries and resources.
      final Unit setAdditionalPythonPaths(ConfigurableFileCollection additionalPythonPaths) Additional locations where to search for libraries and resources.
      final List<Arguments> generateRunArguments()
      • Methods inherited from class de.qualersoft.robotframework.gradleplugin.configurations.LibdocRobotConfiguration

        generateArguments
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LibdocRobotConfiguration

        LibdocRobotConfiguration(Project project)
    • 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 libspec format 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 libspec format 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. raw means preserving the original documentation format and html means converting documentation to HTML. The default is raw with XML spec files and html with JSON specs and when using the special libspec format.

        Valid values:

        • RAW

        • HTML

      • setSpecDocFormat

         final Unit setSpecDocFormat(Property<String> specDocFormat)

        Specifies the documentation format used with XML and JSON spec files. raw means preserving the original documentation format and html means converting documentation to HTML. The default is raw with XML spec files and html with JSON specs and when using the special libspec format.

        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 BuiltIn or com.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.gradle and 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 BuiltIn or com.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.gradle and 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

      • getName

         final Property<String> getName()

        Sets the name of the documented library or resource.

      • 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/