AalekhCheckTask

@DisableCachingByDefault(because = "regression detection compares against the previous run's output; caching could silently mask a newly introduced cycle")
abstract class AalekhCheckTask : DefaultTask(source)

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 reporters

  • aalekh-results.json - full machine-readable report envelope

  • aalekh-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.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open var actions: List<Action<in Task?>?>?
Link copied to clipboard
open val ant: AntBuilder?
Link copied to clipboard
@get:Internal
open val asDynamicObject: DynamicObject
Link copied to clipboard
@get:Internal
abstract val baselineFile: RegularFileProperty

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.

Link copied to clipboard
open val dependsOn: Set<Any?>?
Link copied to clipboard
open var description: @Nullable String?
Link copied to clipboard
open val destroyables: TaskDestroyables?
Link copied to clipboard
open var didWork: Boolean
Link copied to clipboard
open var enabled: Boolean
Link copied to clipboard
open val extensions: ExtensionContainer?
Link copied to clipboard
@get:Input
abstract val featureAllowedPairs: ListProperty<String>

Serialized allow-pairs from featureIsolation { allow(...) }. Format per entry: "fromPattern->toPattern".

Link copied to clipboard
@get:Input
abstract val featurePattern: Property<String>

Glob pattern for feature modules from featureIsolation { featurePattern = "..." }. Empty string means the feature isolation rule is inactive.

Link copied to clipboard
open val finalizedBy: TaskDependency?
Link copied to clipboard
@get:Input
abstract val forbidEntries: ListProperty<String>

Serialized forbid { } predicate rules. Format per entry: "<fromKind>|<fromValue>|<toKind>|<toValue>|<severity>|<reason>". CC-safe plain strings.

Link copied to clipboard
@get:InputFile
@get:PathSensitive(value = PathSensitivity.NONE)
abstract val graphJsonFile: RegularFileProperty
Link copied to clipboard
open var group: @Nullable String?
Link copied to clipboard
open val identityPath: Path?
Link copied to clipboard
Link copied to clipboard
open val inputs: TaskInputsInternal?
Link copied to clipboard
@get:Internal
open var isEnabled: Boolean
Link copied to clipboard
Link copied to clipboard
@get:Input
abstract val layerEntries: ListProperty<String>

Serialized layer declarations from the layers { } DSL block. Format per entry: "layerName|pat1,pat2|allowedLayer1,allowedLayer2|hasRestriction".

Link copied to clipboard
@get:Internal
open val lifecycleDependencies: TaskDependencyInternal?
Link copied to clipboard
open val localState: TaskLocalState?
Link copied to clipboard
open val logger: Logger?
Link copied to clipboard
open val logging: LoggingManager?
Link copied to clipboard
open val mustRunAfter: TaskDependency?
Link copied to clipboard
open val name: String?
Link copied to clipboard
open val onlyIf: Spec<in TaskInternal?>?
Link copied to clipboard
@get:OutputDirectory
abstract val outputDir: DirectoryProperty
Link copied to clipboard
open val outputs: TaskOutputsInternal?
Link copied to clipboard
open val path: String?
Link copied to clipboard
open val project: Project?
Link copied to clipboard
@get:Input
abstract val projectName: Property<String>
Link copied to clipboard
@get:Input
abstract val qualityGateMetrics: ListProperty<String>

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.

Link copied to clipboard
@get:Input
abstract val qualityGateSeverity: Property<String>

Severity name (ERROR / WARNING / INFO) assigned to a metric regression.

Link copied to clipboard
@get:Input
abstract val reachabilityEntries: ListProperty<String>

Serialized reachability rules from rules { forbidReachable(...) / mustBeReachableFrom(...) }. Format per entry: "<kind>|<fromGlob>|<toGlob>|<severity>|<reason>". CC-safe plain strings.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val requiredServices: TaskRequiredServices?
Link copied to clipboard
@get:Input
abstract val ruleEntries: ListProperty<String>

Serialized rule overrides from the rules { } DSL block. Format per entry: "ruleId:severity:LEVEL" or "ruleId:suppress:pattern".

Link copied to clipboard
open val sharedResources: List<ResourceLock?>?
Link copied to clipboard
open val shouldRunAfter: TaskDependency?
Link copied to clipboard
@get:Input
abstract val sourceSetEntries: ListProperty<String>

Serialized per-source-set rules from rules { forbidSourceSetDependency(...) }. Format per entry: "<sourceSet>|<toKind>|<toValue>|<severity>|<reason>". CC-safe plain strings.

Link copied to clipboard
open val standardOutputCapture: StandardOutputCapture?
Link copied to clipboard
open val state: TaskStateInternal?
Link copied to clipboard
open val taskActions: List<InputChangesAwareTaskAction?>?
Link copied to clipboard
open val taskDependencies: TaskDependencyInternal?
Link copied to clipboard
open val taskIdentity: TaskIdentity<*>?
Link copied to clipboard
open val temporaryDir: File?
Link copied to clipboard
open val temporaryDirFactory: Factory<File?>?
Link copied to clipboard
open val timeout: Property<Duration?>?

Functions

Link copied to clipboard
open fun acceptServiceReferences(serviceReferences: Set<ServiceReferenceSpec?>?)
Link copied to clipboard
open fun appendParallelSafeAction(action: Action<in Task?>?)
Link copied to clipboard
fun check()
Link copied to clipboard
open operator fun compareTo(otherTask: Task?): Int
Link copied to clipboard
open fun configure(closure: Closure<*>?): Task?
Link copied to clipboard
open fun dependsOn(vararg paths: Any?): Task?
Link copied to clipboard
open fun doFirst(action: Closure<*>?): Task?
open fun doFirst(action: Action<in Task?>?): Task?
open fun doFirst(actionName: String?, action: Action<in Task?>?): Task?
Link copied to clipboard
open fun doLast(action: Closure<*>?): Task?
open fun doLast(action: Action<in Task?>?): Task?
open fun doLast(actionName: String?, action: Action<in Task?>?): Task?
Link copied to clipboard
open fun doNotTrackState(reasonNotToTrackState: String?)
Link copied to clipboard
open fun doNotTrackStateIf(reason: String?, spec: Spec<in TaskInternal?>?)
Link copied to clipboard
open fun finalizedBy(vararg paths: Any?): Task?
Link copied to clipboard
open fun hasProperty(propertyName: String?): Boolean
Link copied to clipboard
Link copied to clipboard
open fun mustRunAfter(vararg paths: Any?): Task?
Link copied to clipboard
open fun onlyIf(onlyIfClosure: Closure<*>?)
open fun onlyIf(spec: Spec<in Task?>?)
open fun onlyIf(onlyIfReason: String?, spec: Spec<in Task?>?)
Link copied to clipboard
open fun prependParallelSafeAction(action: Action<in Task?>?)
Link copied to clipboard
open fun property(propertyName: String?): Any?
Link copied to clipboard
open fun restoreOnlyIf(onlyIf: Spec<in TaskInternal?>?)
Link copied to clipboard
open fun restoreTaskActions(taskActions: List<InputChangesAwareTaskAction?>?)
Link copied to clipboard
open fun setDependsOn(dependsOn: Iterable<*>?)
Link copied to clipboard
open fun setFinalizedBy(finalizedByTasks: Iterable<*>?)
Link copied to clipboard
open fun setMustRunAfter(mustRunAfterTasks: Iterable<*>?)
Link copied to clipboard
open fun setOnlyIf(onlyIfClosure: Closure<*>?)
open fun setOnlyIf(spec: Spec<in Task?>?)
open fun setOnlyIf(onlyIfReason: String?, spec: Spec<in Task?>?)
Link copied to clipboard
open fun setProperty(name: String?, value: Any?)
Link copied to clipboard
open fun setShouldRunAfter(shouldRunAfterTasks: Iterable<*>?)
Link copied to clipboard
open fun shouldRunAfter(vararg paths: Any?): TaskDependency?
Link copied to clipboard
open fun usesService(service: Provider<out BuildService<*>?>?)