build: Giza's version numbers and an upload key from outside the repo (fork, Phase 7)
versionCode 1 and versionName 0.1.0: a new applicationId has no store history to stay above. The desktop packageVersion stays 1.0.0, since jpackage refuses a DMG whose major version is 0. Release builds are signed with an upload key named by gradle properties (giza.upload.*) or the environment (GIZA_UPLOAD_*), and are unsigned without them, as before. Key files are gitignored. It must never be Bennu's key. The store records, provisioning and listings are outside this tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5b92b83869
commit
c0f1b3d5e3
2 files changed
+29
-2
No files matched your search
@@ -19,3 +19,6 @@ captures
|
||||
**/xcshareddata/WorkspaceSettings.xcsettings
|
||||
node_modules/
|
||||
gradle/gradle-daemon-jvm.properties
|
||||
# Signing keys live outside the repository (composeApp/build.gradle.kts, signingConfigs).
|
||||
*.jks
|
||||
*.keystore
|
||||
@@ -198,8 +198,31 @@ android {
|
||||
applicationId = "mobi.giza.android"
|
||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
||||
versionCode = 9
|
||||
versionName = "0.1.5"
|
||||
// Giza's own numbering, from the start (docs/giza-rebrand.md, D7). A new
|
||||
// applicationId has no versions in the store to stay above; Bennu's ran to 9, 0.1.5.
|
||||
versionCode = 1
|
||||
versionName = "0.1.0"
|
||||
}
|
||||
// The upload key, from outside the repository: gradle properties (~/.gradle/gradle.properties,
|
||||
// or -P on the command line) or the environment, under the names below. Without them a
|
||||
// release build is unsigned, as Bennu's always were from this script, and is signed by hand.
|
||||
//
|
||||
// Never Bennu's key. Two apps sharing a key is half of what Android needs to let one read
|
||||
// the other's data, and Giza must never be able to open Bennu's (giza-rebrand.md, Phase 0).
|
||||
val uploadStoreFile = providers.gradleProperty("giza.upload.storeFile")
|
||||
.orElse(providers.environmentVariable("GIZA_UPLOAD_STORE_FILE"))
|
||||
signingConfigs {
|
||||
if (uploadStoreFile.isPresent) {
|
||||
create("upload") {
|
||||
storeFile = file(uploadStoreFile.get())
|
||||
storePassword = providers.gradleProperty("giza.upload.storePassword")
|
||||
.orElse(providers.environmentVariable("GIZA_UPLOAD_STORE_PASSWORD")).get()
|
||||
keyAlias = providers.gradleProperty("giza.upload.keyAlias")
|
||||
.orElse(providers.environmentVariable("GIZA_UPLOAD_KEY_ALIAS")).get()
|
||||
keyPassword = providers.gradleProperty("giza.upload.keyPassword")
|
||||
.orElse(providers.environmentVariable("GIZA_UPLOAD_KEY_PASSWORD")).get()
|
||||
}
|
||||
}
|
||||
}
|
||||
packaging {
|
||||
resources {
|
||||
@@ -210,6 +233,7 @@ android {
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
isMinifyEnabled = false
|
||||
signingConfigs.findByName("upload")?.let { signingConfig = it }
|
||||
}
|
||||
getByName("debug") {
|
||||
applicationIdSuffix = ".debug"
|
||||
|
||||
Reference in new issue
Block a user