Class ReportTableTestsTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.tabletest.gradle.ReportTableTestsTask
All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

@CacheableTask public abstract class ReportTableTestsTask extends org.gradle.api.DefaultTask
Gradle task for generating documentation from TableTest YAML outputs.

Reads YAML files produced by the TableTest JUnit extension and generates human-readable documentation in AsciiDoc or Markdown format.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Field Summary

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new task instance with default configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.file.RegularFileProperty
    Returns the report configuration file property.
    org.gradle.api.file.FileCollection
    Returns the configuration file as a task input when it exists, so a change to the tabletest-reporter.yaml invalidates the cached report.
    org.gradle.api.file.DirectoryProperty
    Returns the default input directory property.
    org.gradle.api.provider.Property<String>
    Returns the output format property.
    org.gradle.api.provider.Property<String>
    Returns the index depth property.
    org.gradle.api.file.DirectoryProperty
    Returns the input directory property.
    org.gradle.api.file.ConfigurableFileCollection
    Returns the input directories merged into one report, for a multi-project build publishing a single spec.
    org.gradle.api.provider.Property<String>
    Returns the JUnit output directory property.
    org.gradle.api.file.DirectoryProperty
    Returns the output directory property.
    org.gradle.api.file.DirectoryProperty
    Returns the project directory property.
    org.gradle.api.file.FileCollection
    Returns the TableTest YAML files across all candidate input directories.
    org.gradle.api.file.DirectoryProperty
    Returns the template directory property.
    void
    run()
    Executes the task to generate documentation from TableTest YAML files.

    Methods inherited from class org.gradle.api.DefaultTask

    compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService

    Methods inherited from class org.gradle.api.internal.AbstractTask

    acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • ReportTableTestsTask

      @Inject public ReportTableTestsTask()
      Creates a new task instance with default configuration.
  • Method Details

    • getFormat

      @Optional @Input public org.gradle.api.provider.Property<String> getFormat()
      Returns the output format property.
      Returns:
      property for specifying output format (asciidoc or markdown)
    • getInputDir

      @Optional @InputDirectory @PathSensitive(RELATIVE) public org.gradle.api.file.DirectoryProperty getInputDir()
      Returns the input directory property.
      Returns:
      property for directory containing TableTest YAML files
    • getInputDirs

      @Internal public org.gradle.api.file.ConfigurableFileCollection getInputDirs()
      Returns the input directories merged into one report, for a multi-project build publishing a single spec. Overrides getInputDir() when it holds anything; a directory that does not exist is skipped with a warning, so a subproject that has not been built does not fail the report.
      Returns:
      file collection of directories containing TableTest YAML files
    • getOutputDir

      @OutputDirectory public org.gradle.api.file.DirectoryProperty getOutputDir()
      Returns the output directory property.
      Returns:
      property for directory where generated documentation will be written
    • getTemplateDir

      @Optional @InputDirectory @PathSensitive(RELATIVE) public org.gradle.api.file.DirectoryProperty getTemplateDir()
      Returns the template directory property.
      Returns:
      property for optional custom template directory
    • getJunitOutputDir

      @Optional @Input public org.gradle.api.provider.Property<String> getJunitOutputDir()
      Returns the JUnit output directory property.
      Returns:
      property for overriding the default JUnit XML output directory
    • getIndexDepth

      @Optional @Input public org.gradle.api.provider.Property<String> getIndexDepth()
      Returns the index depth property.
      Returns:
      property for specifying how many levels to show in index files (1, 2, ..., or "infinite")
    • getConfigFile

      @Internal public org.gradle.api.file.RegularFileProperty getConfigFile()
      Returns the report configuration file property.
      Returns:
      property for the tabletest-reporter.yaml file holding spec title, intro and feature order
    • getConfigFileInput

      @Optional @InputFiles @PathSensitive(RELATIVE) public org.gradle.api.file.FileCollection getConfigFileInput()
      Returns the configuration file as a task input when it exists, so a change to the tabletest-reporter.yaml invalidates the cached report. Tracked separately from getConfigFile() because the conventional path is often absent, and a declared-but- missing @InputFile would fail the build.
      Returns:
      file collection holding the configuration file when present, otherwise empty
    • getProjectDir

      @Internal public org.gradle.api.file.DirectoryProperty getProjectDir()
      Returns the project directory property.
      Returns:
      property for the project base directory used for resolving relative paths
    • getDefaultInputDir

      @Internal public org.gradle.api.file.DirectoryProperty getDefaultInputDir()
      Returns the default input directory property.
      Returns:
      property for the default directory containing JUnit Jupiter YAML outputs
    • getSourceYamlFiles

      @InputFiles @PathSensitive(RELATIVE) public org.gradle.api.file.FileCollection getSourceYamlFiles()
      Returns the TableTest YAML files across all candidate input directories. Tracked as task inputs so up-to-date checks and the build cache notice new test output even when no explicit input directory is configured.
      Returns:
      file collection of the YAML files the report is generated from
    • run

      public void run()
      Executes the task to generate documentation from TableTest YAML files.
      Throws:
      org.gradle.api.GradleException - if input directory does not exist or report generation fails