Get Android builds in a good place

This commit is contained in:
Alex Gleason committed 2025-10-02 22:26:41 -05:00
1 parent 356778ec95
commit fb0d820b4e
3 files changed
+28 -1

No files matched your search

+1
View File
@@ -30,3 +30,4 @@ dist-ssr
.env.*
!.env.example
.ai/
*.keystore
+26
View File
@@ -16,10 +16,36 @@ android {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
signingConfigs {
release {
def keystorePath = rootProject.file("../shakespeare.keystore")
// Only require keystore for release builds
def taskNames = gradle.startParameter.taskNames.toString()
def isReleaseBuild = taskNames.contains("Release") || taskNames.contains("release") || taskNames.contains("bundle")
if (!isReleaseBuild) {
// Skip signing config for debug builds
return
}
if (!keystorePath.exists()) {
throw new GradleException("shakespeare.keystore not found! Expected at: " + keystorePath.absolutePath)
}
storeFile keystorePath
keyAlias "mykey"
storePassword "shakespeare"
keyPassword "shakespeare"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
"typecheck": "npm i --silent && tsc --noEmit",
"test": "npm i --silent && eslint && vitest run --reporter=dot --silent && echo 'All tests passed!'",
"deploy": "npm run build && npx -y nostr-deploy-cli deploy --skip-setup",
"android:build": "npm run build && npx cap sync android && npx cap build android",
"android:build": "npm run build && npx cap sync android && cd android && ./gradlew bundleRelease",
"android:apk": "npm run android:sync && cd android && ./gradlew assembleDebug",
"android:open": "npx cap open android",
"android:sync": "npm run build && npx cap sync android",