summaryrefslogtreecommitdiff
path: root/ui/preferences/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'ui/preferences/build.gradle')
-rw-r--r--ui/preferences/build.gradle15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/preferences/build.gradle b/ui/preferences/build.gradle
index b91158fb9..c1f56854f 100644
--- a/ui/preferences/build.gradle
+++ b/ui/preferences/build.gradle
@@ -6,6 +6,20 @@ apply from: "../../playFlavor.gradle"
android {
namespace "de.danoeh.antennapod.ui.preferences"
+
+ defaultConfig {
+ def commit = ""
+ try {
+ def hashStdOut = new ByteArrayOutputStream()
+ exec {
+ commandLine "git", "rev-parse", "--short", "HEAD"
+ standardOutput = hashStdOut
+ }
+ commit = hashStdOut.toString().trim()
+ } catch (Exception ignore) {
+ }
+ buildConfigField "String", "COMMIT_HASH", ('"' + (commit.isEmpty() ? "Unknown commit" : commit) + '"')
+ }
}
dependencies {
@@ -23,6 +37,7 @@ dependencies {
annotationProcessor "androidx.annotation:annotation:$annotationVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
+ implementation "androidx.fragment:fragment:$fragmentVersion"
implementation "com.google.android.material:material:$googleMaterialVersion"
implementation "androidx.preference:preference:$preferenceVersion"
implementation "androidx.work:work-runtime:$workManagerVersion"