Package io.github.reqstool.gradle
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
FieldsModifier and TypeFieldDescriptionstatic final StringFilename for manual verification results YAML input file.static final StringFilename for requirements YAML input file.static final StringFilename for software verification cases YAML input file.static final StringDirectory name for test results within the ZIP artifact.static final StringFilename for reqstool configuration YAML file.static final StringFilename for combined annotations YAML output file.static final StringXML element name for requirement implementations.static final StringXML element name for requirement annotations.static final StringXML element name for tests.protected static final StringYAML language server schema hint for annotations files.protected static final StringYAML 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the task.org.gradle.api.file.RegularFilePropertyReturns the dataset directory containing requirements and supporting files.org.gradle.api.file.RegularFilePropertyReturns 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.RegularFilePropertyReturns the path to the requirements annotations YAML file.org.gradle.api.provider.Property<Boolean> getSkip()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.ConfigurableFileCollectionReturns 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.RegularFilePropertyReturns 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, usesServiceMethods 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, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Field Details
-
INPUT_FILE_MANUAL_VERIFICATION_RESULTS_YML
Filename for manual verification results YAML input file.- See Also:
-
INPUT_FILE_REQUIREMENTS_YML
Filename for requirements YAML input file.- See Also:
-
INPUT_FILE_SOFTWARE_VERIFICATION_CASES_YML
Filename for software verification cases YAML input file.- See Also:
-
OUTPUT_FILE_ANNOTATIONS_YML_FILE
Filename for combined annotations YAML output file.- See Also:
-
OUTPUT_ARTIFACT_FILE_REQSTOOL_CONFIG_YML
Filename for reqstool configuration YAML file.- See Also:
-
OUTPUT_ARTIFACT_DIR_TEST_RESULTS
Directory name for test results within the ZIP artifact.- See Also:
-
XML_IMPLEMENTATIONS
XML element name for requirement implementations.- See Also:
-
XML_REQUIREMENT_ANNOTATIONS
XML element name for requirement annotations.- See Also:
-
XML_TESTS
XML element name for tests.- See Also:
-
YAML_LANG_SERVER_SCHEMA_ANNOTATIONS
YAML language server schema hint for annotations files.- See Also:
-
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
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
Returns the list of test result file glob patterns.- Returns:
- list property of test result patterns
-
getSkip
Returns whether this task execution should be skipped.- Returns:
- boolean property
-
getSkipAssembleZipArtifact
Returns whether ZIP artifact assembly should be skipped.- Returns:
- boolean property
-
getSkipAttachZipArtifact
Returns whether artifact attachment should be skipped.- Returns:
- boolean property
-
getProjectName
Returns the name of the project being built.- Returns:
- project name property
-
getProjectVersion
Returns the version of the project being built.- Returns:
- project version property
-
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.
-