Skip to content

Instantly share code, notes, and snippets.

@bensandee
Created August 17, 2017 04:19
Show Gist options
  • Save bensandee/ed62986b21db7dd59ec073792a3c882c to your computer and use it in GitHub Desktop.
Save bensandee/ed62986b21db7dd59ec073792a3c882c to your computer and use it in GitHub Desktop.
task deployApks(type: Copy) {
description = "Copies APKs to the archive directory"
def appName = "${rootProject.name}"
def versionDir = android.defaultConfig.versionName + "-" + android.defaultConfig.versionCode
println("Copies APK and Proguard to " + versionDir)
from fileTree('build/outputs/apk').files
into 'build/archive'
rename('app-(.*)-(.*)\\.apk', "${appName}-${versionDir}-\$1-\$2.apk")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment