From 980120609f620e6ff7a5e898f1eea7a93a7b7829 Mon Sep 17 00:00:00 2001 From: lisonge Date: Mon, 26 Aug 2024 21:35:55 +0800 Subject: [PATCH] feat: GIT_COMMIT_TIME --- app/build.gradle.kts | 4 ++-- app/src/main/kotlin/li/songe/gkd/ui/AboutPage.kt | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index ae341595d..c00e59195 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -65,8 +65,8 @@ android { useSupportLibrary = true } - val nowTime = gitInfo?.commitTime ?: 0 - buildConfigField("Long", "BUILD_TIME", jsonStringOf(nowTime) + "L") + val commitTime = gitInfo?.commitTime ?: 0 + buildConfigField("Long", "GIT_COMMIT_TIME", jsonStringOf(commitTime) + "L") buildConfigField( "String", "GIT_COMMIT_ID", diff --git a/app/src/main/kotlin/li/songe/gkd/ui/AboutPage.kt b/app/src/main/kotlin/li/songe/gkd/ui/AboutPage.kt index bec71c9af..04af90ceb 100644 --- a/app/src/main/kotlin/li/songe/gkd/ui/AboutPage.kt +++ b/app/src/main/kotlin/li/songe/gkd/ui/AboutPage.kt @@ -21,7 +21,6 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.unit.dp import com.ramcosta.composedestinations.annotation.Destination import com.ramcosta.composedestinations.annotation.RootNavGraph import li.songe.gkd.BuildConfig @@ -143,11 +142,11 @@ fun AboutPage() { .itemPadding() ) { Text( - text = "构建时间", + text = "提交时间", style = MaterialTheme.typography.bodyLarge, ) Text( - text = BuildConfig.BUILD_TIME.format("yyyy-MM-dd HH:mm:ss ZZ"), + text = BuildConfig.GIT_COMMIT_TIME.format("yyyy-MM-dd HH:mm:ss ZZ"), style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, )