Version scheme = desktop lockstep (1.0.4), versionCode included
Sonar / Sonar Quality Checks (push) Has been cancelled
Code Quality Checks / Project Check Suite (push) Has been cancelled
Code Quality Checks / Search for forbidden patterns (push) Has been cancelled
Code Quality Checks / Search for invalid screenshot files (push) Has been cancelled
Post-release / post-release (push) Has been cancelled
Code Quality Checks / Ktlint checks (push) Has been cancelled
Code Quality Checks / Doc checks (push) Has been cancelled
Code Quality Checks / Check shell scripts (push) Has been cancelled
Code Quality Checks / Run zizmor (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle (Gplay) (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle Enterprise (push) Has been cancelled
Create release App Bundle and APKs / Create APKs (FDroid) (push) Has been cancelled
Test / Runs unit tests (push) Has been cancelled
Code Quality Checks / Search for invalid dependencies (push) Has been cancelled
Code Quality Checks / Konsist tests (push) Has been cancelled
Code Quality Checks / Compose tests (push) Has been cancelled
Code Quality Checks / Android lint check (push) Has been cancelled
Code Quality Checks / Detekt checks (push) Has been cancelled
Sonar / Sonar Quality Checks (push) Has been cancelled
Code Quality Checks / Project Check Suite (push) Has been cancelled
Code Quality Checks / Search for forbidden patterns (push) Has been cancelled
Code Quality Checks / Search for invalid screenshot files (push) Has been cancelled
Post-release / post-release (push) Has been cancelled
Code Quality Checks / Ktlint checks (push) Has been cancelled
Code Quality Checks / Doc checks (push) Has been cancelled
Code Quality Checks / Check shell scripts (push) Has been cancelled
Code Quality Checks / Run zizmor (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle (Gplay) (push) Has been cancelled
Create release App Bundle and APKs / Create App Bundle Enterprise (push) Has been cancelled
Create release App Bundle and APKs / Create APKs (FDroid) (push) Has been cancelled
Test / Runs unit tests (push) Has been cancelled
Code Quality Checks / Search for invalid dependencies (push) Has been cancelled
Code Quality Checks / Konsist tests (push) Has been cancelled
Code Quality Checks / Compose tests (push) Has been cancelled
Code Quality Checks / Android lint check (push) Has been cancelled
Code Quality Checks / Detekt checks (push) Has been cancelled
Drops upstream's CalVer versionCode entirely; one-time downgrade means pre-1.0.4 installs need a single uninstall/reinstall (accepted). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,35 +30,24 @@ import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
*/
|
||||
|
||||
/**
|
||||
* Year of the version on 2 digits.
|
||||
* Do not update this value. it is updated by the release script.
|
||||
* Blap versions the app in lockstep with the desktop release (upstream's CalVer scheme is
|
||||
* gone). Bump these with every release; versionCode derives from them and must only grow
|
||||
* within this scheme (max 2 digits for minor/patch).
|
||||
*/
|
||||
private const val versionYear = 26
|
||||
|
||||
/**
|
||||
* Month of the version on 2 digits. Value must be in [1,12].
|
||||
* Do not update this value. it is updated by the release script.
|
||||
*/
|
||||
private const val versionMonth = 7
|
||||
|
||||
/**
|
||||
* Release number in the month. Value must be in [0,99].
|
||||
* Do not update this value. it is updated by the release script.
|
||||
*/
|
||||
private const val versionReleaseNumber = 3
|
||||
private const val versionMajor = 1
|
||||
private const val versionMinor = 0
|
||||
private const val versionPatch = 4
|
||||
|
||||
object Versions {
|
||||
/**
|
||||
* Base version code that will be set in the Android Manifest.
|
||||
* The value will be modified at build time to add the ABI code when APK are build.
|
||||
* AAB will have a ABI code of 0.
|
||||
* See comment above for the calculation method.
|
||||
* NOTE: this is a one-time DOWNGRADE from the upstream CalVer codes (2026xxxxx) —
|
||||
* installs from before 1.0.4 must be uninstalled once; sideloads update in place after.
|
||||
*/
|
||||
const val VERSION_CODE = (2000 + versionYear) * 10_000 + versionMonth * 100 + versionReleaseNumber
|
||||
// Blap: the displayed version tracks the desktop release. VERSION_CODE stays on the
|
||||
// CalVer formula above because Android requires it to only ever increase — keep
|
||||
// bumping versionReleaseNumber (and month/year) for every release.
|
||||
const val VERSION_NAME = "1.0.4"
|
||||
const val VERSION_CODE = versionMajor * 10_000 + versionMinor * 100 + versionPatch
|
||||
val VERSION_NAME = "$versionMajor.$versionMinor.$versionPatch"
|
||||
|
||||
/**
|
||||
* Compile SDK version. Must be updated when a new Android version is released.
|
||||
@@ -104,8 +93,8 @@ object Versions {
|
||||
|
||||
// Perform some checks on the values to avoid releasing with bad values
|
||||
init {
|
||||
require(versionMonth in 1..12) { "versionMonth must be in [1,12]" }
|
||||
require(versionReleaseNumber in 0..99) { "versionReleaseNumber must be in [0,99]" }
|
||||
require(versionMinor in 0..99) { "versionMinor must be in [0,99]" }
|
||||
require(versionPatch in 0..99) { "versionPatch must be in [0,99]" }
|
||||
require(BUILD_TOOLS_VERSION.startsWith(COMPILE_SDK.toString())) { "When updating COMPILE_SDK, please also update BUILD_TOOLS_VERSION" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user