Configuration

The plugin provides zero-configuration defaults that match the standard Gradle project layout. Override only what you need.

Configuration reference

Property Type Default Description

requirementsAnnotationsFile

RegularFileProperty

build/generated/sources/annotationProcessor/java/main/resources/annotations.yml

Requirements annotations YAML file generated by the annotation processor for the main source set

svcsAnnotationsFiles

ConfigurableFileCollection

Auto-discovered from all non-main source sets

SVCs annotations YAML files, one per test source set (e.g. test, integrationTest)

svcsAnnotationsFile (deprecated)

Object

Deprecated since 0.1.1. Use svcsAnnotationsFiles.from(…​) instead. Delegates to svcsAnnotationsFiles and emits a WARN log.

outputDirectory

RegularFileProperty

build/reqstool

Output directory for the ZIP artifact and combined annotations.yml

datasetPath

RegularFileProperty

reqstool/ (project directory)

Directory containing requirements.yml and optional supporting files

testResults

ListProperty<String>

["build/test-results/*/.xml"]

Ant-style glob patterns for test result XML files to include in the ZIP

skip

Property<Boolean>

false

Skip all plugin execution

skipAssembleZipArtifact

Property<Boolean>

false

Skip ZIP assembly; annotations are still combined into annotations.yml

skipAttachZipArtifact

Property<Boolean>

false

Skip attaching the ZIP artifact to Maven publications

Dataset directory

The datasetPath directory must contain at minimum a requirements.yml file. Optional files in the same directory are included if present.

File Required

requirements.yml

Yes

software_verification_cases.yml

No

manual_verification_results.yml

No

Minimal configuration

Only datasetPath needs to be set when the dataset lives outside the default reqstool/ directory:

requirementsTool {
    datasetPath = file('docs/reqstool')
}

Complete configuration example

requirementsTool {
    requirementsAnnotationsFile =
        file('build/generated/sources/annotationProcessor/java/main/resources/annotations.yml')

    // svcsAnnotationsFiles is a file collection — use .from() to add files additively
    svcsAnnotationsFiles.from(
        file('build/generated/sources/annotationProcessor/java/test/resources/annotations.yml')
    )

    outputDirectory         = file('build/reqstool')
    datasetPath             = file('docs/reqstool')
    testResults             = ['build/test-results/**/*.xml']
    skip                    = false
    skipAssembleZipArtifact = false
    skipAttachZipArtifact   = false
}

Overriding auto-discovered annotation files

svcsAnnotationsFiles is auto-discovered from all non-main source sets. To replace auto-discovery with explicit paths (also disables auto-wired compile dependencies for test source sets):

requirementsTool {
    setSvcsAnnotationsFiles(
        file('custom/path/test-annotations.yml'),
        file('custom/path/it-annotations.yml')
    )
}

Auto-wired task dependencies

When the java plugin is applied, the plugin automatically wires:

  • assembleRequirements depends on compileJava (main source set)

  • assembleRequirements depends on compileXxxJava for each non-main source set (unless svcsAnnotationsFiles was set explicitly via setSvcsAnnotationsFiles(…​))

  • build is finalized by assembleRequirements

No manual dependsOn or finalizedBy blocks are needed in the consuming project.

If an annotation file is missing at execution time (e.g. when a compile task was excluded), the plugin emits a WARN message identifying the missing file.

Deprecation notice

The svcsAnnotationsFile property (singular) from plugin 0.1.0 has been replaced by svcsAnnotationsFiles (plural, a ConfigurableFileCollection). The old property still works but emits a deprecation warning and will be removed in a future release.

// Deprecated — emits a warning; delegates to svcsAnnotationsFiles.from(...)
requirementsTool {
    svcsAnnotationsFile = file('...')
}

// Preferred — additive
requirementsTool {
    svcsAnnotationsFiles.from(file('...'))
}