feat: version name suffix #215
3 changed files with 9 additions and 3 deletions
|
@ -27,6 +27,9 @@ android {
|
|||
}
|
||||
|
||||
buildTypes {
|
||||
defaultConfig {
|
||||
versionNameSuffix = "-unpriv"
|
||||
}
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
|
|
|
@ -23,6 +23,9 @@ android {
|
|||
}
|
||||
|
||||
buildTypes {
|
||||
defaultConfig {
|
||||
versionNameSuffix = "-priv"
|
||||
}
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
|
|
|
@ -16,7 +16,7 @@ val Project.gitVersionCode: Int
|
|||
standardOutput = stdout
|
||||
}
|
||||
stdout.toString("utf-8").trim('\n').toInt()
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
0
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ val Project.gitVersionName: String
|
|||
standardOutput = stdout
|
||||
}
|
||||
stdout.toString("utf-8").trim('\n')
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
"Unknown"
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ class MyVersioningPlugin: Plugin<Project> {
|
|||
target.configure<BaseAppModuleExtension> {
|
||||
defaultConfig {
|
||||
versionCode = target.gitVersionCode
|
||||
versionName = target.gitVersionName
|
||||
versionName = target.gitVersionName.removePrefix("unpriv-")
|
||||
}
|
||||
|
||||
applicationVariants.all {
|
||||
|
|
Loading…
Add table
Reference in a new issue