Class RequirementsToolTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.github.reqstool.gradle.RequirementsToolTask
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>

@DisableCachingByDefault(because="Assembles build artifacts \u2014 not safe to cache") public class RequirementsToolTask extends org.gradle.api.DefaultTask
Task for assembling reqstool ZIP artifact. Combines requirements annotations with test annotations and creates a ZIP artifact containing requirements, SVCs, test results, and combined annotations.
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Filename for manual verification results YAML input file.
    static final String
    Filename for requirements YAML input file.
    static final String
    Filename for software verification cases YAML input file.
    static final String
    Directory name for test results within the ZIP artifact.
    static final String
    Filename for reqstool configuration YAML file.
    static final String
    Filename for combined annotations YAML output file.
    static final String
    XML element name for requirement implementations.
    static final String
    XML element name for requirement annotations.
    static final String
    XML element name for tests.
    protected static final String
    YAML language server schema hint for annotations files.
    protected static final String
    YAML language server schema hint for reqstool config files.

    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
    Default constructor for RequirementsToolTask.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the task.
    org.gradle.api.file.RegularFileProperty
    Returns the dataset directory containing requirements and supporting files.
    org.gradle.api.file.RegularFileProperty
    Returns the output directory file property.
    Returns the absolute path to the output directory.
    org.gradle.api.provider.Property<File>
    Returns the base directory of the project.
    org.gradle.api.provider.Property<String>
    Returns the name of the project being built.
    org.gradle.api.provider.Property<String>
    Returns the version of the project being built.
    org.gradle.api.file.RegularFileProperty
    Returns the path to the requirements annotations YAML file.
    org.gradle.api.provider.Property<Boolean>
    Returns whether this task execution should be skipped.
    org.gradle.api.provider.Property<Boolean>
    Returns whether ZIP artifact assembly should be skipped.
    org.gradle.api.provider.Property<Boolean>
    Returns whether artifact attachment should be skipped.
    org.gradle.api.file.ConfigurableFileCollection
    Returns the collection of SVCs (Software Verification Cases) annotations YAML files, one per test source set.
    org.gradle.api.provider.ListProperty<String>
    Returns the list of test result file glob patterns.
    org.gradle.api.file.RegularFileProperty
    Returns the path where the reqstool ZIP artifact will be written.

    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
  • Field Details

    • INPUT_FILE_MANUAL_VERIFICATION_RESULTS_YML

      public static final String INPUT_FILE_MANUAL_VERIFICATION_RESULTS_YML
      Filename for manual verification results YAML input file.
      See Also:
    • INPUT_FILE_REQUIREMENTS_YML

      public static final String INPUT_FILE_REQUIREMENTS_YML
      Filename for requirements YAML input file.
      See Also:
    • INPUT_FILE_SOFTWARE_VERIFICATION_CASES_YML

      public static final String INPUT_FILE_SOFTWARE_VERIFICATION_CASES_YML
      Filename for software verification cases YAML input file.
      See Also:
    • OUTPUT_FILE_ANNOTATIONS_YML_FILE

      public static final String OUTPUT_FILE_ANNOTATIONS_YML_FILE
      Filename for combined annotations YAML output file.
      See Also:
    • OUTPUT_ARTIFACT_FILE_REQSTOOL_CONFIG_YML

      public static final String OUTPUT_ARTIFACT_FILE_REQSTOOL_CONFIG_YML
      Filename for reqstool configuration YAML file.
      See Also:
    • OUTPUT_ARTIFACT_DIR_TEST_RESULTS

      public static final String OUTPUT_ARTIFACT_DIR_TEST_RESULTS
      Directory name for test results within the ZIP artifact.
      See Also:
    • XML_IMPLEMENTATIONS

      public static final String XML_IMPLEMENTATIONS
      XML element name for requirement implementations.
      See Also:
    • XML_REQUIREMENT_ANNOTATIONS

      public static final String XML_REQUIREMENT_ANNOTATIONS
      XML element name for requirement annotations.
      See Also:
    • XML_TESTS

      public static final String XML_TESTS
      XML element name for tests.
      See Also:
    • YAML_LANG_SERVER_SCHEMA_ANNOTATIONS

      protected static final String YAML_LANG_SERVER_SCHEMA_ANNOTATIONS
      YAML language server schema hint for annotations files.
      See Also:
    • YAML_LANG_SERVER_SCHEMA_CONFIG

      protected static final String YAML_LANG_SERVER_SCHEMA_CONFIG
      YAML language server schema hint for reqstool config files.
      See Also:
  • Constructor Details

    • RequirementsToolTask

      public RequirementsToolTask()
      Default constructor for RequirementsToolTask.
  • Method Details

    • getRequirementsAnnotationsFile

      @Optional @InputFile @PathSensitive(NONE) public org.gradle.api.file.RegularFileProperty getRequirementsAnnotationsFile()
      Returns the path to the requirements annotations YAML file.
      Returns:
      file property for requirements annotations
    • getSvcsAnnotationsFiles

      @InputFiles @Optional @PathSensitive(NONE) public org.gradle.api.file.ConfigurableFileCollection getSvcsAnnotationsFiles()
      Returns the collection of SVCs (Software Verification Cases) annotations YAML files, one per test source set.
      Returns:
      file collection for SVCs annotations
    • getOutputDirectoryPath

      @Input public String getOutputDirectoryPath()
      Returns the absolute path to the output directory.
      Returns:
      output directory path as a string
    • getOutputDirectory

      @Internal public org.gradle.api.file.RegularFileProperty getOutputDirectory()
      Returns the output directory file property.
      Returns:
      file property for the output directory
    • getDatasetPath

      @InputDirectory @Optional @PathSensitive(NONE) public org.gradle.api.file.RegularFileProperty getDatasetPath()
      Returns the dataset directory containing requirements and supporting files.
      Returns:
      file property for the dataset directory
    • getTestResults

      @Input public org.gradle.api.provider.ListProperty<String> getTestResults()
      Returns the list of test result file glob patterns.
      Returns:
      list property of test result patterns
    • getSkip

      @Input public org.gradle.api.provider.Property<Boolean> getSkip()
      Returns whether this task execution should be skipped.
      Returns:
      boolean property
    • getSkipAssembleZipArtifact

      @Input public org.gradle.api.provider.Property<Boolean> getSkipAssembleZipArtifact()
      Returns whether ZIP artifact assembly should be skipped.
      Returns:
      boolean property
    • getSkipAttachZipArtifact

      @Input public org.gradle.api.provider.Property<Boolean> getSkipAttachZipArtifact()
      Returns whether artifact attachment should be skipped.
      Returns:
      boolean property
    • getProjectName

      @Input public org.gradle.api.provider.Property<String> getProjectName()
      Returns the name of the project being built.
      Returns:
      project name property
    • getProjectVersion

      @Input public org.gradle.api.provider.Property<String> getProjectVersion()
      Returns the version of the project being built.
      Returns:
      project version property
    • getProjectBasedir

      @Input public org.gradle.api.provider.Property<File> getProjectBasedir()
      Returns the base directory of the project.
      Returns:
      project base directory property
    • getZipFile

      @OutputFile public org.gradle.api.file.RegularFileProperty getZipFile()
      Returns the path where the reqstool ZIP artifact will be written.
      Returns:
      file property for the ZIP artifact
    • execute

      @Requirements("GRADLE_PLUGIN_003") public void execute()
      Executes the task. Combines requirements and test annotations into a single annotations file, and optionally assembles a ZIP artifact containing requirements, annotations, and test results.