More version plumping

This commit is contained in:
darken
2022-10-27 17:38:50 +02:00
committed by Matthias Urhahn
parent f9a97297da
commit bddb20c5bb
2 changed files with 32 additions and 6 deletions
+9 -6
View File
@@ -14,13 +14,16 @@ object ProjectConfig {
const val targetSdk = 33
object Version {
const val major = 2
const val minor = 2
const val patch = 1
const val build = 0
val versionProperties = Properties().apply {
load(FileInputStream(File("version.properties")))
}
val major = versionProperties.getProperty("project.versioning.major").toInt()
val minor = versionProperties.getProperty("project.versioning.minor").toInt()
val patch = versionProperties.getProperty("project.versioning.patch").toInt()
val build = versionProperties.getProperty("project.versioning.build").toInt()
const val name = "${major}.${minor}.${patch}-rc${build}"
const val code = major * 10000000 + minor * 100000 + patch * 1000 + build * 10
val name = "${major}.${minor}.${patch}-rc${build}"
val code = major * 10000000 + minor * 100000 + patch * 1000 + build * 10
}
}