Little cleanup of filterAbout task

This commit is contained in:
ByteHamster 2019-10-03 23:47:48 +02:00
parent 611d8c9e45
commit 073ddced41
1 changed files with 7 additions and 14 deletions

View File

@ -189,21 +189,14 @@ if (project.hasProperty("antennaPodServiceAccountEmail")) {
} }
} }
// about.html is templatized so that we can automatically insert task filterAbout(type: Copy) {
// 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"
outputs.upToDateWhen { false }
} doLast {
copy {
from "src/main/templates/about.html" from "src/main/templates/about.html"
into "src/main/assets" into "src/main/assets"
filter(ReplaceTokens, tokens: [versionname: android.defaultConfig.versionName, filter(ReplaceTokens, tokens: [
versionname: android.defaultConfig.versionName,
commit : "git rev-parse --short HEAD".execute().text, commit : "git rev-parse --short HEAD".execute().text,
year : new Date().format('yyyy')]) year : new Date().format('yyyy')])
} outputs.upToDateWhen { false }
} }
task copyTextFiles(type: Copy) { task copyTextFiles(type: Copy) {