feat: GIT_COMMIT_TIME
Some checks are pending
Build-Apk / build (push) Waiting to run

This commit is contained in:
lisonge 2024-08-26 21:35:55 +08:00
parent 8c404f9f32
commit 980120609f
2 changed files with 4 additions and 5 deletions

View File

@ -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",

View File

@ -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,
)