Files
brainwave/build.gradle.kts
T

85 lines
2.6 KiB
Kotlin
Raw Normal View History

import org.gradle.api.tasks.Exec
plugins {
base
2026-08-07 18:00:38 +08:00
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.hilt) apply false
}
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",
)
2026-08-04 23:32:44 +08:00
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(
2026-08-07 18:00:38 +08:00
":app:lintDebug",
":app:testDebugUnitTest",
":app:assembleDebug",
2026-08-04 23:32:44 +08:00
":app:verifyDependencyLicenses",
verifyDocs,
scanSecrets,
verifyDomainBoundaries,
verifyPrototype,
verifyContentContract,
spotlessCheck,
2026-08-04 23:32:44 +08:00
verifyDependencyLicenseManifest,
)
}
tasks.named("check") {
dependsOn("verifyLocal")
}