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