From ac533a391346554d9a47c9ecc5012c0512711de4 Mon Sep 17 00:00:00 2001 From: Gabriel Calero Date: Tue, 19 Jun 2018 23:13:09 -0300 Subject: [PATCH] Debugging gradle script --- android/build.gradle | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 2cd49d6a78..358335de89 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,6 +21,7 @@ buildscript { plugins { id 'de.undercouch.download' version '3.3.0' id "cz.malohlava" version "1.0.3" + id "io.github.http-builder-ng.http-plugin" version "0.1.1" } allprojects { @@ -608,14 +609,17 @@ task uploadBreakpadDumpSymsRelease(dependsOn: runBreakpadDumpSymsRelease) { } } - -task uploadBreakpadDumpSymsDebug(dependsOn: zipDumpSymsDebug) { - doLast { - def p = ['curl', '--data-binary', "@"+new File("${appDir}/build/tmp/", "symbols-${RELEASE_NUMBER}.zip").absolutePath, "\"https://gcalero998.sp.backtrace.io:6098/post?format=symbols&token=d65d0d184789ac40c121952001fd91dfba7e149899b1eeccd68ccffe91dd2fd0\""].execute() - p.waitFor() - if (p.exitValue() != 0) { - println "Upload breakpad symbols: curl exited with status " + p.exitValue() - println p.getErrorStream().text +task uploadBreakpadDumpSymsDebug(type:io.github.httpbuilderng.http.HttpTask, dependsOn: zipDumpSymsDebug) { + config { + request.uri = 'https://gcalero998.sp.backtrace.io:6098' + } + post { + request.uri.path = '/post' + request.uri.query = [format: 'symbols', token: 'd65d0d184789ac40c121952001fd91dfba7e149899b1eeccd68ccffe91dd2fd0'] + request.body = new File("${appDir}/build/tmp/", "symbols-${RELEASE_NUMBER}.zip").bytes + request.contentType = 'application/octet-stream' + response.success { + println ("${appDir}/build/tmp/symbols-${RELEASE_NUMBER}.zip uploaded") } }