From 6195060f35c78249f4630865e09855f9e624bd32 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 5 Nov 2026 15:52:37 +0100 Subject: feat(app): add an about screen Version with build number, documentation and project links, Ko-fi, the privacy statement, the certificate this copy was really signed with, and the licenses. Debug builds also show the git commit, since a test build can share its version with a release. Co-Authored-By: Claude Opus 5.5 --- .../main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build-logic/src') diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt index 051645d1..47409d11 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt @@ -22,6 +22,14 @@ class ApplicationPlugin : Plugin { project.pluginManager.apply(AppPlugin::class) AndroidCommon.configure(project) val minifySwitch = project.providers.environmentVariable("DISABLE_MINIFY") + val commit = + project.providers + .exec { + commandLine("git", "rev-parse", "--short=8", "HEAD") + isIgnoreExitValue = true + } + .standardOutput + .asText project.extensions.configure { dependenciesInfo { includeInBundle = false @@ -41,12 +49,14 @@ class ApplicationPlugin : Plugin { ) ) buildConfigField("boolean", "ENABLE_DEBUG_FEATURES", "${project.isSnapshot()}") + buildConfigField("String", "GIT_COMMIT", "\"\"") } named("debug") { applicationIdSuffix = ".debug" versionNameSuffix = "-debug" isMinifyEnabled = false buildConfigField("boolean", "ENABLE_DEBUG_FEATURES", "true") + buildConfigField("String", "GIT_COMMIT", "\"${commit.get().trim()}\"") } } -- cgit v1.2.3