AalekhCheckTask
Evaluates all configured architecture rules and fails the build on ERROR-severity violations.
On each run, reads the previous run's aalekh-results.json to extract the prior cycle count for regression detection. Writes three output files:
aalekh-results.xml- JUnit XML for CI test reportersaalekh-results.json- full machine-readable report envelopeaalekh-results.sarif- SARIF 2.1 for GitHub code scanning PR annotations
Run: ./gradlew aalekhCheck Also runs automatically as part of ./gradlew check.
Caching is intentionally disabled. preventRegression reads the prior run's aalekh-results.json to compare cycle counts; that file lives in this task's own @OutputDirectory and is not declared as an @Input. Caching the task would let Gradle restore a stale PASS and skip the regression check entirely, which is the exact failure mode this rule exists to catch.
Properties
The committed baseline file (aalekh-baseline.json) written by aalekhBaseline. When present, violations recorded in it are suppressed and only new ones fail the build.
Serialized allow-pairs from featureIsolation { allow(...) }. Format per entry: "fromPattern->toPattern".
Glob pattern for feature modules from featureIsolation { featurePattern = "..." }. Empty string means the feature isolation rule is inactive.
Serialized forbid { } predicate rules. Format per entry: "<fromKind>|<fromValue>|<toKind>|<toValue>|<severity>|<reason>". CC-safe plain strings.
Serialized layer declarations from the layers { } DSL block. Format per entry: "layerName|pat1,pat2|allowedLayer1,allowedLayer2|hasRestriction".
Metric keys enabled as quality gates via qualityGates { forbidRegression(...) }. Each names a structural metric that must not exceed its baseline value. Empty means no gates are enforced.
Severity name (ERROR / WARNING / INFO) assigned to a metric regression.
Serialized reachability rules from rules { forbidReachable(...) / mustBeReachableFrom(...) }. Format per entry: "<kind>|<fromGlob>|<toGlob>|<severity>|<reason>". CC-safe plain strings.
Serialized rule overrides from the rules { } DSL block. Format per entry: "ruleId:severity:LEVEL" or "ruleId:suppress:pattern".
Serialized per-source-set rules from rules { forbidSourceSetDependency(...) }. Format per entry: "<sourceSet>|<toKind>|<toValue>|<severity>|<reason>". CC-safe plain strings.