Skip to content

Instantly share code, notes, and snippets.

Last active May 30, 2017 10:41
What would you like to do?
Android / Gradle - copy apk to folder for backup after assemble. Should be run manually ( `$./gradlew assemble backupApks` )
// Copy assembled apks into TEST_BACKUP (must run manually)
task backupApks(type: Copy) {
if (project.hasProperty("TEST_BACKUP")) {
println "Backing up apks..."
include '*prod-release.apk'
include '*prod-staging.apk'
into "${project.getProperty("TEST_BACKUP")}"
} else {
println "No backup done because TEST_BACKUP gradle variable is not defined."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment