Last active
January 30, 2018 13:06
-
-
Save aballano/50385add9fbbe06c755e8cd7f5158784 to your computer and use it in GitHub Desktop.
Trying to copy generated apk from build/outputs/apk/{variantname}/name.apk to build/outputs/apk/name.apk
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
def publish = project.tasks.create("copyApkToCustomDir") | |
android.applicationVariants.all { variant -> | |
variant.outputs.all { output -> | |
def task = project.tasks.create("copy${variant.name}Apk", Copy) | |
task.from(output.outputFile) | |
task.into("$project.buildDir/outputs/apk/") | |
println "Done" | |
task.dependsOn variant.assemble | |
publish.dependsOn task | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment