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
// 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 {
task filterAbout(type: Copy) {
from "src/main/templates/about.html"
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,
year : new Date().format('yyyy')])
}
outputs.upToDateWhen { false }
}
task copyTextFiles(type: Copy) {