fix: use doFirst instead of onlyIf for keystore validation task
dev / Build debug APK (push) Failing after 18s
dev / Build debug APK (push) Failing after 18s
This commit is contained in:
1 parent
06d647cf72
commit
4bbe29851a
1 file changed
+2
-3
@@ -73,10 +73,10 @@ android {
|
||||
|
||||
// Fail fast with an actionable message only when assembleRelease actually
|
||||
// runs and the keystore is missing — not during project configuration.
|
||||
tasks.register<AbstractTask>("validateReleaseKeystore") {
|
||||
tasks.register("validateReleaseKeystore") {
|
||||
group = "build"
|
||||
description = "Validates that keystore/release.jks exists before assembleRelease runs"
|
||||
onlyIf {
|
||||
doFirst {
|
||||
val f = rootProject.file("keystore/release.jks")
|
||||
if (!f.exists()) {
|
||||
throw GradleException(
|
||||
@@ -92,7 +92,6 @@ android {
|
||||
"L=Local, ST=Local, C=NZ\""
|
||||
)
|
||||
}
|
||||
true
|
||||
}
|
||||
}
|
||||
tasks.named("assembleRelease") { dependsOn("validateReleaseKeystore") }
|
||||
|
||||
Reference in new issue
Block a user