Created
March 5, 2014 06:54
-
-
Save robUx4/9362413 to your computer and use it in GitHub Desktop.
Copy the Proguard mapping.txt next to the apk with a matching name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android.applicationVariants.all { variant -> | |
if (variant.buildType.runProguard) { | |
variant.assemble.doLast { | |
description "ProGuard mapping copy" | |
def mappingSource = new File(projectDir, "build/proguard/" + variant.buildType.name+"/mapping.txt") | |
def mappingDest = new File(variant.outputFile.parent) | |
copy { | |
from mappingSource | |
into mappingDest | |
rename { String fileName -> | |
fileName.replace('mapping.txt', variant.outputFile.name.replace(".apk", "-mapping.txt")) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment