Skip to content

Commit

Permalink
feat: GIT_COMMIT_TIME
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Aug 26, 2024
1 parent 8c404f9 commit 9801206
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/kotlin/li/songe/gkd/ui/AboutPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
)
Expand Down

0 comments on commit 9801206

Please sign in to comment.