Compute version code and version name from separate component
This commit is contained in:
parent
114f868c1f
commit
675b142709
1 changed files with 11 additions and 3 deletions
|
|
@ -17,10 +17,18 @@
|
||||||
import org.gradle.api.JavaVersion
|
import org.gradle.api.JavaVersion
|
||||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||||
|
|
||||||
object Versions {
|
// Note: 2 digits max for each value
|
||||||
const val versionCode = 100200
|
private const val versionMajor = 0
|
||||||
const val versionName = "0.2.0"
|
private const val versionMinor = 1
|
||||||
|
|
||||||
|
// Note: even values are reserved for regular release, odd values for hotfix release.
|
||||||
|
// When creating a hotfix, you should decrease the value, since the current value
|
||||||
|
// is the value for the next regular release.
|
||||||
|
private const val versionPatch = 2
|
||||||
|
|
||||||
|
object Versions {
|
||||||
|
val versionCode = (versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch) * 10
|
||||||
|
val versionName = "$versionMajor.$versionMinor.$versionPatch"
|
||||||
const val compileSdk = 33
|
const val compileSdk = 33
|
||||||
const val targetSdk = 33
|
const val targetSdk = 33
|
||||||
const val minSdk = 23
|
const val minSdk = 23
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue