fix: 尝试静态化版本

为了F-Droid构建
This commit is contained in:
Super12138 2025-02-14 17:20:57 +08:00
parent fd8736e166
commit 1728da4e45

View file

@ -12,8 +12,9 @@ ksp {
// 配置版本信息
val baseVersionName = "2.0.0"
val commitHash by lazy { "git rev-parse --short HEAD".exec() }
val verCode by lazy { "git rev-list --count HEAD".exec().toInt() }
val commitHash = "git rev-parse --short HEAD".exec().toInt()
val verCode = "git rev-list --count HEAD".exec().toInt()
val verName = "${baseVersionName}-${commitHash}"
android {
namespace = "cn.super12138.todo"
@ -36,7 +37,7 @@ android {
minSdk = 24
targetSdk = 35
versionCode = verCode
versionName = "${baseVersionName}-${commitHash}"
versionName = verName
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"