aboutsummaryrefslogtreecommitdiffstats
path: root/build-logic/src
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-05 15:52:37 +0100
committerDanilo M. <danix@danix.xyz>2026-11-05 15:52:37 +0100
commit6195060f35c78249f4630865e09855f9e624bd32 (patch)
tree0611f94925e6768621cace46c7b97886e7dc8469 /build-logic/src
parentdaa7ee010aa88df8664c9b10eb09bbe95eb11bd9 (diff)
downloadHardenedPass-6195060f35c78249f4630865e09855f9e624bd32.tar.gz
HardenedPass-6195060f35c78249f4630865e09855f9e624bd32.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'build-logic/src')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/ApplicationPlugin.kt10
1 files changed, 10 insertions, 0 deletions
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> {
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<ApplicationExtension> {
dependenciesInfo {
includeInBundle = false
@@ -41,12 +49,14 @@ class ApplicationPlugin : Plugin<Project> {
)
)
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()}\"")
}
}