add gitCommitNumber to versionCode and bump version to 0.1.3
This commit is contained in:
parent
e28a93da5c
commit
a68bc64243
1 changed files with 12 additions and 3 deletions
|
|
@ -26,8 +26,8 @@ android {
|
||||||
applicationId = "com.pixelized.rplexicon"
|
applicationId = "com.pixelized.rplexicon"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 33
|
targetSdk = 33
|
||||||
versionCode = 3
|
versionCode = gitBuildNumber
|
||||||
versionName = "0.1.2"
|
versionName = "0.1.3"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables {
|
vectorDrawables {
|
||||||
|
|
@ -127,3 +127,12 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
private val NamedDomainObjectContainer<SigningConfig>.pixelized get() = this.getByName("pixelized")
|
private val NamedDomainObjectContainer<SigningConfig>.pixelized get() = this.getByName("pixelized")
|
||||||
|
|
||||||
|
val gitBuildNumber: Int get() {
|
||||||
|
val stdout = org.apache.commons.io.output.ByteArrayOutputStream()
|
||||||
|
rootProject.exec {
|
||||||
|
commandLine("git", "rev-list", "--count", "HEAD")
|
||||||
|
standardOutput = stdout
|
||||||
|
}
|
||||||
|
return stdout.toString().trim().toInt()
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue