Don't fail for keystore

This commit is contained in:
Butterscotch!
2025-12-09 07:21:19 -05:00
parent 712fa6a1ad
commit 575778ab85
2 changed files with 8 additions and 7 deletions

View File

@@ -37,17 +37,18 @@ tasks.register<Copy>("copyGuiAssets") {
throw GradleException("You need to run \"pnpm run build\" on the gui folder first!")
}
}
tasks.preBuild {
dependsOn(":server:android:copyGuiAssets")
// Validate release keystore
tasks.register("validateKeyStore") {
val storeFile = android.buildTypes.getByName("release").signingConfig?.storeFile
// Only warn for now since this is run even when irrelevant
if (storeFile?.isFile != true) {
throw GradleException("Android KeyStore file does not exist or is not a file: ${storeFile?.path}")
logger.error("Android KeyStore file does not exist or is not a file: ${storeFile?.path}")
} else if (storeFile.length() <= 0) {
throw GradleException("Android KeyStore file is empty: ${storeFile.path}")
logger.error("Android KeyStore file is empty: ${storeFile.path}")
}
}
tasks.preBuild {
dependsOn(":server:android:copyGuiAssets", ":server:android:validateKeyStore")
}
tasks.withType<KotlinCompile> {
compilerOptions {