You rock Rike, thanks so much. Android Studio has changed a bit but here's my updated script:
https://gist.github.com/robertsimoes/23e4ae728ef3fd3f924440c059a4b6e1 ``` task deployApks(type:Copy) { description = "Copies APKs and Proguard mappings to the deploy directory" def appName = "your-app-here"; def versionDir = android.defaultConfig.versionName+"_"+android.defaultConfig.versionCode; println("Copies APK and Proguard to " + versionDir) from 'build/outputs/mapping/release/' include '**/mapping.txt' into '../.admin/deploy/' + versionDir rename ('mapping.txt', "${versionDir}-mapping.txt") from ('.') { exclude '**/build', '**/src' } include '*.apk' into '../.admin/deploy/' + versionDir rename ('app-release.apk', "${appName}-${versionDir}.apk") } On Thursday, December 12, 2013 at 6:03:32 AM UTC-5, Rike wrote: > > Thanks for sharing! After I found your copy task I read on about different > tasks and found the following addition to have the copy task automatically > executed each time the release version is created. This is especially handy > using Android Studio, where the gradle task to build is chosen internally. > > > task deployApks(type:Copy) { > description = "Copies APKs and Proguard mappings to the deploy > directory" > > def versionDir = project.VERSION_NAME + "_" + project.VERSION_CODE > println("Copies APK and Proguard to v" + versionDir) > > from 'build/apk', 'build/proguard/release' > include '**/*-release.apk', '**/*.txt' > into 'deploy/v' + versionDir > } > > assembleRelease.finalizedBy deployApks > -- 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/d/optout.
