Skip to content

Gradle Plugin

In Development

The Gradle plugin is on the roadmap as v0.7. This page documents the planned interface.

Setup

Apply the plugin (Kotlin DSL)

plugins {
    id("com.intrigsoft.prathya.gradle") version "0.6.1"
}

dependencies {
    testImplementation("com.intrigsoft.prathya:prathya-annotations:0.6.1")
}

Configuration

prathya {
    contractFile = file("CONTRACT.yaml")
    failOnViolations = true
    outputDirectory = layout.buildDirectory.dir("prathya")
}

Tasks

Task Description
prathyaVerify Full pipeline: parse contract, scan tests, compute coverage, audit, generate reports
prathyaAudit Run the audit engine only — reports violations to console
prathyaReport Generate reports only (no build failure)
prathyaRun Run tests mapped to requirements

Usage

# Full verification
./gradlew prathyaVerify

# Audit only
./gradlew prathyaAudit

# Generate reports
./gradlew prathyaReport

The prathyaVerify task depends on the test task and runs after tests complete, mirroring the Maven lifecycle.

Output

Reports are generated in build/prathya/:

Output Location
HTML report build/prathya/index.html
JSON report build/prathya/prathya-report.json