From 46dc476d296b4e027a18a95bac8def650a1215de Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 22 Jan 2026 02:19:35 +0000 Subject: [PATCH] feat: display git commit SHA on About page - Add GIT_COMMIT_SHA buildConfigField in build.gradle using git rev-parse - Add TextView to content_about.xml to display commit SHA below build time - Update AboutActivity.kt to populate the commit SHA from BuildConfig - Add commit_sha_string_format string resource This helps identify exactly which commit a build came from when looking at the About page in the app. Co-authored-by: wharris --- android/app/build.gradle | 3 +++ .../com/github/quarck/calnotify/ui/AboutActivity.kt | 3 +++ android/app/src/main/res/layout/content_about.xml | 10 ++++++++++ android/app/src/main/res/values/strings.xml | 1 + 4 files changed, 17 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 8b71a609a..ef3e98239 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -99,6 +99,9 @@ android { versionName "9.16.0" buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L" + // Git commit SHA for identifying builds + def gitSha = 'git rev-parse --short HEAD'.execute().text.trim() + buildConfigField "String", "GIT_COMMIT_SHA", "\"${gitSha}\"" // React Native New Architecture flags buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", project.hasProperty("newArchEnabled") ? project.property("newArchEnabled") : "false" buildConfigField "boolean", "IS_HERMES_ENABLED", project.hasProperty("hermesEnabled") ? project.property("hermesEnabled") : "true" diff --git a/android/app/src/main/java/com/github/quarck/calnotify/ui/AboutActivity.kt b/android/app/src/main/java/com/github/quarck/calnotify/ui/AboutActivity.kt index d476bb4fc..df9248ff4 100644 --- a/android/app/src/main/java/com/github/quarck/calnotify/ui/AboutActivity.kt +++ b/android/app/src/main/java/com/github/quarck/calnotify/ui/AboutActivity.kt @@ -51,6 +51,9 @@ class AboutActivity : AppCompatActivity() { val buildTime = find(R.id.text_view_app_build_time) buildTime?.text = String.format(resources.getString(R.string.build_time_string_format), getBuildDate()) + + val commitSha = find(R.id.text_view_app_commit_sha) + commitSha?.text = String.format(resources.getString(R.string.commit_sha_string_format), BuildConfig.GIT_COMMIT_SHA) } fun getBuildDate(): String { diff --git a/android/app/src/main/res/layout/content_about.xml b/android/app/src/main/res/layout/content_about.xml index 009f7659d..f0a08d611 100644 --- a/android/app/src/main/res/layout/content_about.xml +++ b/android/app/src/main/res/layout/content_about.xml @@ -49,6 +49,16 @@ android:layout_gravity="center_horizontal" tools:ignore="HardcodedText" /> + Marshmallow and above only!\nThis would trigger app to use setAlarmClock API call when scheduling reminders and snoozed events\nThis would increase reminders time accuracy\nAs a side effect, user would see \'alarm\' icon on UI when there are snoozed events or active reminders Build time: %s + Commit: %s Dismiss all events Dismiss all events?\n\nCANNOT BE UNDONE!\n\nSnoozed events would not be removed Handle events with no reminders