From 611d8c9e453e131beb424969e251393c082daf09 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 3 Oct 2019 23:37:43 +0200 Subject: [PATCH 1/2] Always update about screen commit --- app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 0fdfd153e..9a2a3b815 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -195,6 +195,7 @@ task filterAbout { inputs.files files(["src/main/templates/about.html", "src/main/AndroidManifest.xml"]) outputs.file "src/main/assets/about.html" + outputs.upToDateWhen { false } } doLast { copy { from "src/main/templates/about.html" @@ -212,6 +213,7 @@ task copyTextFiles(type: Copy) { rename { String fileName -> fileName + ".txt" } + outputs.upToDateWhen { false } } preBuild.dependsOn filterAbout, copyTextFiles From 073ddced41b92d619d74b35d86731c5c4fb8a393 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 3 Oct 2019 23:47:48 +0200 Subject: [PATCH 2/2] Little cleanup of filterAbout task --- app/build.gradle | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9a2a3b815..34a384f88 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -189,21 +189,14 @@ if (project.hasProperty("antennaPodServiceAccountEmail")) { } } -// about.html is templatized so that we can automatically insert -// our version string in to it at build time. -task filterAbout { - inputs.files files(["src/main/templates/about.html", - "src/main/AndroidManifest.xml"]) - outputs.file "src/main/assets/about.html" +task filterAbout(type: Copy) { + from "src/main/templates/about.html" + into "src/main/assets" + filter(ReplaceTokens, tokens: [ + versionname: android.defaultConfig.versionName, + commit : "git rev-parse --short HEAD".execute().text, + year : new Date().format('yyyy')]) outputs.upToDateWhen { false } -} doLast { - copy { - from "src/main/templates/about.html" - into "src/main/assets" - filter(ReplaceTokens, tokens: [versionname: android.defaultConfig.versionName, - commit : "git rev-parse --short HEAD".execute().text, - year : new Date().format('yyyy')]) - } } task copyTextFiles(type: Copy) {