feat: show the build's commit hash under About

A short, faded commit hash next to the version in Settings > About, so a bug
report can name the exact build. Baked into BuildConfig at build time from
`git rev-parse HEAD` (fixed 7 chars, so the same commit always yields the
same value and the APK stays reproducible); empty, and hidden, on a build
with no git metadata such as a source tarball.
This commit is contained in:
austinried
2026-10-09 18:06:38 +00:00
parent 0a3e839da0
commit 7bbc29a1d6
2 changed files with 24 additions and 1 deletions
@@ -388,7 +388,16 @@ fun SettingsScreen(
ListItem(
headlineContent = { Text(stringResource(R.string.app_name)) },
supportingContent = {
Text(stringResource(R.string.settings_about_version, BuildConfig.VERSION_NAME))
Row(verticalAlignment = Alignment.CenterVertically) {
Text(stringResource(R.string.settings_about_version, BuildConfig.VERSION_NAME))
if (BuildConfig.COMMIT_HASH.isNotEmpty()) {
Spacer(Modifier.width(8.dp))
Text(
BuildConfig.COMMIT_HASH,
color = MaterialTheme.colorScheme.outline,
)
}
}
},
leadingContent = { Icon(Icons.Rounded.Info, contentDescription = null) },
colors = ListItemDefaults.colors(containerColor = Color.Transparent),