build: Add log message when libWebRtc is downloaded

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-05-11 22:30:20 +02:00
parent ff32ab1172
commit f9472ab273
No known key found for this signature in database
GPG Key ID: 2585783189A62105
2 changed files with 3 additions and 2 deletions

View File

@ -351,4 +351,4 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}

View File

@ -48,7 +48,7 @@ abstract class DownloadWebRtcTask extends DefaultTask {
return "https://github.com/nextcloud-releases/talk-clients-webrtc/releases/download/${webRtcVersion}-RC1/${getFileName()}"
}
public String getOutputPath() {
String getOutputPath() {
return "${project.buildDir}/download/${getFileName()}"
}
@ -56,6 +56,7 @@ abstract class DownloadWebRtcTask extends DefaultTask {
def run() {
libFile.parentFile.mkdirs()
if (!libFile.exists()) {
logger.lifecycle("Downloading libWebRTC ${version.get()} from ${getDownloadUrl()}")
new URL(getDownloadUrl()).withInputStream { downloadStream ->
libFile.withOutputStream { fileOut ->
fileOut << downloadStream