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"
|
||||
minSdk = 26
|
||||
targetSdk = 33
|
||||
versionCode = 3
|
||||
versionName = "0.1.2"
|
||||
versionCode = gitBuildNumber
|
||||
versionName = "0.1.3"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
|
@ -126,4 +126,13 @@ dependencies {
|
|||
kapt("com.github.bumptech.glide:compiler:4.14.2") // this have to be align with landscapist-glide
|
||||
}
|
||||
|
||||
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