Three-part version names for the car build
The unstable flavor appended upstream's CI build number as a fourth part (2.8.0.0-unstable; always .0 without CI). Versions are now the plain three-part defaultConfig version: 2.8.1-unstable, and build-car names the APK NilsMG4-unstable-2.8.1.apk. The version code keeps the x100000 factor (2.8.1 = 6700000): without it the code would fall below the 6600000 already installed, and the installer refuses downgrades. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QLJfZQZeAKAwSqViTmLzki
This commit is contained in:
@@ -114,6 +114,9 @@ tyre pressures, GPS (lat, lon, elevation, heading) and the is_* flags. It does *
|
|||||||
INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in
|
INGEST_TOKEN) into git and pushed it. Commit amended and force-pushed; both values regenerated in
|
||||||
the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside
|
the now gitignored `k8s/secrets.yaml` (since moved to `k8s/secrets/secrets.yaml`, outside
|
||||||
`kubectl apply -f k8s/`). Filled-in secrets live only there from now on.
|
`kubectl apply -f k8s/`). Filled-in secrets live only there from now on.
|
||||||
|
- 2026-10-17 — App 2.8.1: three-part version names (`2.8.1-unstable`, `NilsMG4-unstable-2.8.1.apk`).
|
||||||
|
Upstream's fourth part was its CI build number; the version code keeps the x100000 factor so it
|
||||||
|
never falls below codes already installed.
|
||||||
- 2026-10-17 — App 2.8.0: immersive full screen (switch in the Upload tab, default on). Hides the
|
- 2026-10-17 — App 2.8.0: immersive full screen (switch in the Upload tab, default on). Hides the
|
||||||
system bars on the emulator; whether SAIC's own bars on the MG4 can be hidden is only known once
|
system bars on the emulator; whether SAIC's own bars on the MG4 can be hidden is only known once
|
||||||
tried on the car.
|
tried on the car.
|
||||||
|
|||||||
+12
-16
@@ -34,8 +34,8 @@ android {
|
|||||||
applicationId "com.stinnesbeck.nilsmg4"
|
applicationId "com.stinnesbeck.nilsmg4"
|
||||||
minSdk 27
|
minSdk 27
|
||||||
targetSdk 36
|
targetSdk 36
|
||||||
versionCode 66
|
versionCode 67
|
||||||
versionName "2.8.0"
|
versionName "2.8.1"
|
||||||
|
|
||||||
// Nothing about the server ships in the APK: its URL and ingest token are entered in
|
// Nothing about the server ships in the APK: its URL and ingest token are entered in
|
||||||
// the app's Server tab (ServerConfig), and the database is only reachable by the server.
|
// the app's Server tab (ServerConfig), and the database is only reachable by the server.
|
||||||
@@ -61,16 +61,13 @@ android {
|
|||||||
unstable {
|
unstable {
|
||||||
dimension "channel"
|
dimension "channel"
|
||||||
applicationIdSuffix ".unstable"
|
applicationIdSuffix ".unstable"
|
||||||
// Android uses versionCode, not versionName, to order package updates. Give
|
// Three-part versions, the same as defaultConfig ("2.8.1-unstable"). Upstream added
|
||||||
// every rolling CI build a strictly increasing code so Package Installer does
|
// a fourth part for its CI build number; there is no CI here and the OTA updater is
|
||||||
// not treat a newer unstable APK as the same package version.
|
// off. The version code keeps upstream's x100000 so it never drops below codes
|
||||||
versionCode defaultConfig.versionCode * 100000 +
|
// already installed on the car (2.8.0.0 was 6600000): a lower code is a downgrade,
|
||||||
(project.findProperty('unstableBuild') ?: '0').toString().toInteger()
|
// which the installer refuses.
|
||||||
// Le numéro de build fait partie du COEUR numérique de la version
|
versionCode defaultConfig.versionCode * 100000
|
||||||
// ("1.0.42-unstable"), pas du suffixe : l'updater compare des segments
|
versionName defaultConfig.versionName
|
||||||
// numériques, donc deux builds unstable doivent différer avant le premier tiret.
|
|
||||||
// -PunstableBuild=<n> est passé par la CI ; 0 en local.
|
|
||||||
versionName "${defaultConfig.versionName}.${project.findProperty('unstableBuild') ?: '0'}"
|
|
||||||
versionNameSuffix "-unstable"
|
versionNameSuffix "-unstable"
|
||||||
buildConfigField "boolean", "OTA_ENABLED", "true"
|
buildConfigField "boolean", "OTA_ENABLED", "true"
|
||||||
}
|
}
|
||||||
@@ -106,12 +103,11 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Version publiée par la CI pour composer le nom de l'asset APK : ce nom DOIT être
|
// The version build-car puts in the APK's file name ("NilsMG4-unstable-2.8.1.apk"), which
|
||||||
// comparable par l'updater ("NilsMG4-unstable-1.0.42.apk"). Le tag de la
|
// is also the name the OTA updater reads a release's version from.
|
||||||
// pré-release est la constante "unstable", écrasée à chaque build.
|
|
||||||
tasks.register('printUnstableVersion') {
|
tasks.register('printUnstableVersion') {
|
||||||
doLast {
|
doLast {
|
||||||
println "${android.defaultConfig.versionName}.${project.findProperty('unstableBuild') ?: '0'}"
|
println android.defaultConfig.versionName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user