-
-
Save engincancan/75a0f3471847208a396a6373c8a85971 to your computer and use it in GitHub Desktop.
Gradle task to archive APKs once built through android studio by running ./gradlew deployApks
This file contains hidden or 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
task deployApks(type:Copy) { | |
description = "Copies APKs and Proguard mappings to the deploy directory" | |
def appName = "posture"; | |
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") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment