here's a simple shell script I use. It's not ideal, but gets the job done.

execute with some version number like *./release-apk v1.0*


#!/bin/bash

if [[ -z $1 ]]; then
  echo "Usage:"
  echo "release-apk <apk-version>"
  exit 1
fi

VERSION=${1}
APK="app-${VERSION}.apk"
PROGUARD_MAPPING="mapping-${VERSION}.txt"

./gradlew clean app:assembleRelease \
  && cp app/build/apk/app-release.apk releases/${APK} \
  && cp 
app/build/proguard/release/mapping.txt releases/proguard/${PROGUARD_MAPPING}


On Monday, March 3, 2014 5:00:48 PM UTC-5, Federico Barone wrote:
>
> Hi! I'm wondering if we can take advantage of gradle flexibility to 
> automatize a little thing we have to do manually at the moment: as you 
> know, when gradle obfuscates the code, it also creates a file called 
> mapping.txt which allows to unobfuscate the code for analizing stack 
> traces. According to android developers' site, it is a good practice to 
> save somewhere else or to rename this file for each release of an app, 
> otherwise it will be overwritten. At the moment, as far as I know, it has 
> to be done manually, so the question is: is there a simple way to add a 
> custom (or one made by you) gradle task which manages this process? Or at 
> least a task which executes a custom script (bash/batch) which manages the 
> process? If not, could it be implemented someday?
> Thank you in advance! 

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to