reqstool Gradle Plugin

This Gradle plugin generates a ZIP artifact containing combined annotations and various reports for reqstool. It provides zero-configuration defaults while allowing customization when needed.

Features

  • Zero-configuration: Works out of the box with sensible defaults

  • Automatic lifecycle integration: Runs as part of the standard build task

  • Maven publishing support: Automatically registers ZIP artifact for publication

  • Combines annotations: Merges requirements annotations from implementation and test code

  • Assembles ZIP artifact: Creates structured ZIP containing requirements, test results, and configuration

Quick Start

Apply the Plugin

plugins {
    id 'io.github.reqstool.gradle-plugin' version '0.1.0'
}

Default Behavior

The plugin automatically:

  1. Runs after the check task (when tests complete)

  2. Combines annotation files from build/generated-sources/ and build/generated-test-sources/

  3. Creates a ZIP artifact in build/reqstool/ containing:

    • requirements.yml (from ./reqstool/ directory)

    • software_verification_cases.yml (optional)

    • manual_verification_results.yml (optional)

    • annotations.yml (combined/merged annotations)

    • test_results/ (XML test results from build/test-results/)

    • reqstool_config.yml (configuration manifest)

  4. Registers the ZIP for Maven publication (if maven-publish plugin is applied)

Minimal Setup

Create a reqstool/ directory in your project root with a requirements.yml file:

my-project/
├── build.gradle
├── reqstool/
│   └── requirements.yml  (mandatory)
└── src/

Run gradle build and the ZIP artifact will be created automatically.

Prerequisites

  • Gradle 9.0+

  • Java 21+

  • A requirements.yml file in the dataset directory (default: ./reqstool/)

License

MIT License.