Commit 22e960d6 authored by Marc Schwede's avatar Marc Schwede 💬 Committed by Eric Eastwood
Browse files

merge gradle tasks and remove println's

parent e1ff3979
......@@ -23,40 +23,30 @@ else {
// Download gitter-webapp assets from current release
task fetchWebappAssets(type: GradleBuild) {
task fetchWebappAssets() {
description("Download gitter-webapp assets from current release and move")
tasks = ['configureWebappAssets', 'downloadWebappAssets']
}
task configureWebappAssets() {
doLast{
file("${buildDir}/tmp/fetchWebappAssets").mkdirs()
}
}
task downloadWebappAssets() {
def zipFile = file("${buildDir}/tmp/fetchWebappAssets/webapp-artifacts.zip")
def zipFile = file("${getTemporaryDir()}/webapp-artifacts.zip")
doLast {
def artifactURI = "https://gitlab.com/gitlab-org/gitter/webapp/-/jobs/artifacts/master/download?job=mobile-asset-build"
println("Starte Download")
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")
println("Extrahiere")
from zipTree(zipFile)
into file("${buildDir}/tmp/fetchWebappAssets")
doLast {
println("versuche zu verschieben")
ant.move file: file("${buildDir}/tmp/fetchWebappAssets/output/android/www"),
todir: assetsDir
delete(zipFile,)
}
}
downloadWebappAssets.finalizedBy(extractWebappAssets)
fetchWebappAssets.finalizedBy(extractWebappAssets)
android {
compileSdkVersion 26
......
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