Created
April 22, 2019 15:20
-
-
Save shekibobo/447b34a218b322e8ce4904c8805b2bc2 to your computer and use it in GitHub Desktop.
Assemble all distribution apks with filenames and copy the debug and release versions of each build flavor to an `apks` directory.
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
task copyApks(type: Copy) { | |
["debug", "release"].each { type -> | |
from "build/outputs/apk/${type}/" | |
} | |
into "apks/all-${AppVersion.fullVersionCode}-${gitSha}" | |
include '**/*.apk' | |
rename { String filename -> | |
filename.replace("app-", "").replace(".apk", "-${AppVersion.fullVersionCode}-${gitSha}.apk") | |
} | |
} | |
task assembleDistribution(type: GradleBuild) { | |
tasks = ['clean', 'assembleDebug', 'assembleRelease'] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment