1
0
forked from GRIN/grim

android: version tracks GOBLIN_BUILD, not GRIM's frozen 0.3.6

versionCode/versionName were inherited from GRIM (5 / "0.3.6") at the fork and
never rewired to Goblin's build number, so every build shipped as versionCode 5
- Android could not tell builds apart and Settings showed 0.3.6 for build 130.
Gradle now derives both from the GOBLIN_BUILD env (the same number the Rust side
stamps into crate::BUILD), with a fallback to the old values for a keyless local
gradle build.
This commit is contained in:
2ro
2026-07-03 11:47:38 -04:00
parent 87f82eb61e
commit 61545b767d
+9 -2
View File
@@ -11,8 +11,15 @@ android {
applicationId "st.goblin.wallet"
minSdk 24
targetSdk 36
versionCode 5
versionName "0.3.6"
// Version tracks Goblin's build number (GOBLIN_BUILD) so the Android
// package identity moves forward with every release instead of freezing.
// Same env the Rust side stamps into crate::BUILD; the in-app updater
// compares build numbers, and this keeps versionCode (Android's
// upgrade/downgrade integer) in lockstep. Bare local gradle → fallback.
// ponytail: fallback keeps a keyless ./gradlew working; CI/release sets the env
def goblinBuild = (System.getenv("GOBLIN_BUILD") ?: "").trim()
versionCode goblinBuild.isEmpty() ? 5 : goblinBuild.toInteger()
versionName goblinBuild.isEmpty() ? "0.3.6" : goblinBuild
}
lint {