fix: 尝试静态化版本
为了F-Droid构建
This commit is contained in:
parent
fd8736e166
commit
1728da4e45
1 changed files with 4 additions and 3 deletions
|
|
@ -12,8 +12,9 @@ ksp {
|
||||||
|
|
||||||
// 配置版本信息
|
// 配置版本信息
|
||||||
val baseVersionName = "2.0.0"
|
val baseVersionName = "2.0.0"
|
||||||
val commitHash by lazy { "git rev-parse --short HEAD".exec() }
|
val commitHash = "git rev-parse --short HEAD".exec().toInt()
|
||||||
val verCode by lazy { "git rev-list --count HEAD".exec().toInt() }
|
val verCode = "git rev-list --count HEAD".exec().toInt()
|
||||||
|
val verName = "${baseVersionName}-${commitHash}"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "cn.super12138.todo"
|
namespace = "cn.super12138.todo"
|
||||||
|
|
@ -36,7 +37,7 @@ android {
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = verCode
|
versionCode = verCode
|
||||||
versionName = "${baseVersionName}-${commitHash}"
|
versionName = verName
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue