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