Commit 966fa2c9 authored by Marc Schwede's avatar Marc Schwede 💬 Committed by Eric Eastwood
Browse files

merge tasks and eliminate nonrecurring execution

parent 22e960d6
Pipeline #64719966 passed with stages
in 9 minutes and 24 seconds
......@@ -25,29 +25,21 @@ else {
// Download gitter-webapp assets from current release
task fetchWebappAssets() {
description("Download gitter-webapp assets from current release and move")
def zipFile = file("${getTemporaryDir()}/webapp-artifacts.zip")
doLast {
def zipFile = file("${getTemporaryDir()}/webapp-artifacts.zip")
def assetsDir = file("${projectDir}/src/main/assets")
def artifactURI = "https://gitlab.com/gitlab-org/gitter/webapp/-/jobs/artifacts/master/download?job=mobile-asset-build"
new URL(artifactURI).withInputStream { i -> zipFile.withOutputStream { it << i } }
}
}
task extractWebappAssets(type: Copy) {
def zipFile = file("${buildDir}/tmp/fetchWebappAssets/webapp-artifacts.zip")
def assetsDir = file("${projectDir}/src/main/assets")
from zipTree(zipFile)
into file("${buildDir}/tmp/fetchWebappAssets")
doLast {
ant.move file: file("${buildDir}/tmp/fetchWebappAssets/output/android/www"),
copy {
from zipTree(zipFile)
into file("${getTemporaryDir()}")
}
ant.move file: file("${getTemporaryDir()}/output/android/www"),
todir: assetsDir
delete(zipFile,)
delete(zipFile, getTemporaryDir())
}
}
fetchWebappAssets.finalizedBy(extractWebappAssets)
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment