feat: version name suffix #215

Merged
PeterCxy merged 1 commit from septs/OpenEUICC:version-name-suffix into master 2025-08-10 22:08:31 +02:00
3 changed files with 9 additions and 3 deletions

View file

@ -27,6 +27,9 @@ android {
}
buildTypes {
defaultConfig {
versionNameSuffix = "-unpriv"
}
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")

View file

@ -23,6 +23,9 @@ android {
}
buildTypes {
defaultConfig {
versionNameSuffix = "-priv"
}
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")

View file

@ -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 {