From 0fdce8de4d0953dddc6babd675de6bcb0594b6fe Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 31 Oct 2023 12:01:52 +0100 Subject: [PATCH] Upload mapping files --- app/build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index f30807b933..55f2f475e6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -340,8 +340,16 @@ android { // $JAVA_HOME/bin/java -jar ~/Android/Sdk/tools/proguard/lib/retrace.jar ~/email/app/schemas/mapping/FairEmail-v1.nnn-github-release-mapping.txt if (variant.getBuildType().isMinifyEnabled()) variant.assembleProvider.get().doLast { - for (file in variant.getMappingFileProvider().get().files) + for (file in variant.getMappingFileProvider().get().files) { if (file != null && file.exists()) { + exec { + commandLine 'curl', + '-o', '/dev/null', + '-X', 'POST', "https://M66B:" + localProperties.getProperty("bb.pwd", "") + "@api.bitbucket.org/2.0/repositories/M66B/fairemail-test/downloads", + '--form', "files=@" + file + ";" + + "filename=FairEmail-v1." + getVersionCode() + getRevision() + "-" + variant.baseName + "-mapping.txt" + } + def dir = "${rootDir}/app/schemas/mapping" def name = "$archivesBaseName-$variant.baseName-$file.name" def target = new File(dir, name) @@ -352,6 +360,7 @@ android { rename { String fileName -> name } } } + } } }