Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions .github/workflows/publish_gh_pages.yml

This file was deleted.

23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Contributing to reqstool-java-gradle-plugin

Thank you for your interest in contributing!

For DCO sign-off, commit conventions, and code review process, see the organization-wide [CONTRIBUTING.md](https://github.com/reqstool/.github/blob/main/CONTRIBUTING.md).

## Prerequisites

- Java 21+
- Gradle 9.3+ (use the wrapper)

## Setup

```bash
git clone https://github.com/reqstool/reqstool-java-gradle-plugin.git
cd reqstool-java-gradle-plugin
```

## Build & Test

```bash
./gradlew build
```
9 changes: 0 additions & 9 deletions README.adoc

This file was deleted.

55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[![Commit Activity](https://img.shields.io/github/commit-activity/m/reqstool/reqstool-java-gradle-plugin?label=commits&style=for-the-badge)](https://github.com/reqstool/reqstool-java-gradle-plugin/pulse)
[![GitHub Issues](https://img.shields.io/github/issues/reqstool/reqstool-java-gradle-plugin?style=for-the-badge&logo=github)](https://github.com/reqstool/reqstool-java-gradle-plugin/issues)
[![License](https://img.shields.io/github/license/reqstool/reqstool-java-gradle-plugin?style=for-the-badge&logo=opensourceinitiative)](https://opensource.org/license/mit/)
[![Build](https://img.shields.io/github/actions/workflow/status/reqstool/reqstool-java-gradle-plugin/build.yml?style=for-the-badge&logo=github)](https://github.com/reqstool/reqstool-java-gradle-plugin/actions/workflows/build.yml)
[![Documentation](https://img.shields.io/badge/Documentation-blue?style=for-the-badge&link=docs)](https://reqstool.github.io)

# Reqstool Gradle Plugin

Gradle build plugin for [reqstool](https://github.com/reqstool/reqstool-client) that assembles requirements traceability artifacts.

## Overview

Collects `@Requirements` and `@SVCs` annotations from compiled Java code, combines them with test results, and packages everything into a ZIP artifact for analysis by the reqstool CLI. Supports Java 21+.

## Installation

Add the plugin to your `build.gradle`:

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

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

tasks.named('build') {
finalizedBy tasks.named('assembleRequirements')
}

tasks.named('assembleRequirements') {
dependsOn tasks.named('test')
}
```

## Usage

```bash
gradle clean build
```

The plugin generates a ZIP artifact in `build/reqstool/` containing requirements, annotations, and test results.

## Documentation

Full documentation can be found [here](https://reqstool.github.io).

## Contributing

See the organization-wide [CONTRIBUTING.md](https://github.com/reqstool/.github/blob/main/CONTRIBUTING.md).

## License

MIT License.
1 change: 1 addition & 0 deletions docs/antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraPlaybookSchema.json
# For local development only. Published site: https://reqstool.github.io

site:
title: Reqstool Gradle Plugin
Expand Down
4 changes: 3 additions & 1 deletion docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* xref:index.adoc[Start]
* xref:index.adoc[Overview]
* xref:configuration.adoc[Configuration]
* xref:usage.adoc[Usage]
58 changes: 0 additions & 58 deletions docs/modules/ROOT/pages/description.adoc

This file was deleted.

63 changes: 58 additions & 5 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
= Reqstool Gradle Plugin
= reqstool Gradle Plugin

include::description.adoc[]
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.

include::configuration.adoc[]
== Features

include::usage.adoc[]
* *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

include::license.adoc[]
== Quick Start

== Apply the Plugin

[source,gradle]
----
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:

[source]
----
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.
3 changes: 0 additions & 3 deletions docs/modules/ROOT/pages/license.adoc

This file was deleted.

2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/usage.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Usage

To use the Reqstool Gradle Plugin, add the following configuration to your Gradle project's `build.gradle`:
To use the reqstool Gradle Plugin, add the following configuration to your Gradle project's `build.gradle`:

=== Basic Usage

Expand Down