Compute version code and version name from separate component
This commit is contained in:
parent
ec79c44324
commit
312fe6adc8
1 changed files with 11 additions and 3 deletions
|
|
@ -17,10 +17,18 @@
|
|||
import org.gradle.api.JavaVersion
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
|
||||
object Versions {
|
||||
const val versionCode = 100200
|
||||
const val versionName = "0.2.0"
|
||||
// Note: 2 digits max for each value
|
||||
private const val versionMajor = 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 targetSdk = 33
|
||||
const val minSdk = 23
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue