Fix version code issue.
This commit is contained in:
parent
f431e76d29
commit
75aaa9284b
1 changed files with 28 additions and 1 deletions
|
|
@ -17,6 +17,33 @@
|
|||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
|
||||
/**
|
||||
* Version codes are quite sensitive, because there is a mix between bundle and APKs, and we have to take into
|
||||
* account the future upgrade of Element Android.
|
||||
* Max versionCode allowed by the PlayStore (for information):
|
||||
* 2_100_000_000
|
||||
* Current version code of EAx on the PlayStore, for the first uploaded beta (we cannot go below):
|
||||
* ----1_001_000
|
||||
* Current version code of EAx on the nightly:
|
||||
* ----1_001_000
|
||||
* Current version of Element Android (at some point EAx will replace this app) (v1.6.3)
|
||||
* ----40_106_03a where a stands for the architecture: 1, 2, 3, 4 and 0 for the universal APK
|
||||
* Current version of EAx distributed with Firebase app distribution:
|
||||
* ----1_002_000
|
||||
* Latest version of EAx distributed with Firebase app distribution (downgrading, so that's a problem)
|
||||
* -------10_200
|
||||
* Version when running the current debug build
|
||||
* -------10_200
|
||||
*
|
||||
* So adding 4_000_000 to the current version Code computed here should be fine, we will have:
|
||||
* Release version:
|
||||
* ---40_001_020
|
||||
* Nightly version:
|
||||
* ---40_001_020
|
||||
* Debug version:
|
||||
* ---40_010_200
|
||||
*/
|
||||
|
||||
// Note: 2 digits max for each value
|
||||
private const val versionMajor = 0
|
||||
private const val versionMinor = 1
|
||||
|
|
@ -27,7 +54,7 @@ private const val versionMinor = 1
|
|||
private const val versionPatch = 2
|
||||
|
||||
object Versions {
|
||||
val versionCode = (versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch) * 10
|
||||
val versionCode = 4_000_000 + versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch
|
||||
val versionName = "$versionMajor.$versionMinor.$versionPatch"
|
||||
const val compileSdk = 33
|
||||
const val targetSdk = 33
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue