feat: add domain core and verification harness
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
import org.gradle.api.tasks.Exec
|
||||
|
||||
plugins {
|
||||
base
|
||||
}
|
||||
|
||||
fun registerNodeVerificationTask(
|
||||
name: String,
|
||||
description: String,
|
||||
script: String,
|
||||
) = tasks.register<Exec>(name) {
|
||||
group = LifecycleBasePlugin.VERIFICATION_GROUP
|
||||
this.description = description
|
||||
workingDir(rootDir)
|
||||
commandLine("node", script)
|
||||
}
|
||||
|
||||
val verifyDocs = registerNodeVerificationTask(
|
||||
name = "verifyDocs",
|
||||
description = "Checks local Markdown links and required harness documents.",
|
||||
script = "scripts/verify-docs.mjs",
|
||||
)
|
||||
|
||||
val scanSecrets = registerNodeVerificationTask(
|
||||
name = "scanSecrets",
|
||||
description = "Scans repository text files for high-confidence secret patterns.",
|
||||
script = "scripts/scan-secrets.mjs",
|
||||
)
|
||||
|
||||
val verifyDomainBoundaries = registerNodeVerificationTask(
|
||||
name = "verifyDomainBoundaries",
|
||||
description = "Prevents Android, persistence, and network imports in the domain core.",
|
||||
script = "scripts/verify-domain-boundaries.mjs",
|
||||
)
|
||||
|
||||
val verifyPrototype = registerNodeVerificationTask(
|
||||
name = "verifyPrototype",
|
||||
description = "Runs dependency-free syntax checks for the HTML prototype harness.",
|
||||
script = "scripts/verify-prototype.mjs",
|
||||
)
|
||||
|
||||
val verifyContentContract = registerNodeVerificationTask(
|
||||
name = "verifyContentContract",
|
||||
description = "Validates the versioned local-content contract and its negative fixtures.",
|
||||
script = "scripts/verify-content-contract.mjs",
|
||||
)
|
||||
|
||||
val spotlessCheck = registerNodeVerificationTask(
|
||||
name = "spotlessCheck",
|
||||
description = "Runs the dependency-free repository formatting gate.",
|
||||
script = "scripts/verify-format.mjs",
|
||||
)
|
||||
|
||||
tasks.register("verifyLocal") {
|
||||
group = LifecycleBasePlugin.VERIFICATION_GROUP
|
||||
description = "Runs every environment-independent local quality gate."
|
||||
dependsOn(
|
||||
":app:test",
|
||||
verifyDocs,
|
||||
scanSecrets,
|
||||
verifyDomainBoundaries,
|
||||
verifyPrototype,
|
||||
verifyContentContract,
|
||||
spotlessCheck,
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named("check") {
|
||||
dependsOn("verifyLocal")
|
||||
}
|
||||
Reference in New Issue
Block a user