Files
brainwave/build.gradle.kts
T
QiuSW de480ee9bb
verify / harness (push) Has been cancelled
chore: verify dependency licenses
2026-08-04 23:32:44 +08:00

79 lines
2.3 KiB
Kotlin

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",
)
val verifyDependencyLicenseManifest = registerNodeVerificationTask(
name = "verifyDependencyLicenseManifest",
description = "Checks the reviewed dependency-license manifest against pinned build versions.",
script = "scripts/verify-dependency-licenses.mjs",
)
tasks.register("verifyLocal") {
group = LifecycleBasePlugin.VERIFICATION_GROUP
description = "Runs every environment-independent local quality gate."
dependsOn(
":app:test",
":app:verifyDependencyLicenses",
verifyDocs,
scanSecrets,
verifyDomainBoundaries,
verifyPrototype,
verifyContentContract,
spotlessCheck,
verifyDependencyLicenseManifest,
)
}
tasks.named("check") {
dependsOn("verifyLocal")
}