Created
February 23, 2017 05:56
-
-
Save afshin-hoseini/80e40216c675296ec41d9ca5f0673093 to your computer and use it in GitHub Desktop.
Change android output files in module level build gradle file
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
//Put this in android block | |
libraryVariants.all { variant -> | |
variant.outputs.each { output -> | |
println("---> Variant name: " + variant.getName()) | |
println("---> Variant base name: " + variant.getBaseName()) | |
println("---> Variant Assemble: " + variant.getAssemble()) | |
def outputFile = output.outputFile | |
println("---> OUT PUT PARENT: " + outputFile.parent); | |
if (outputFile != null && outputFile.name.endsWith('.aar')) { | |
def fileName = "SpotBaseLib-${variant.getBaseName()}-${defaultConfig.versionName}.aar" | |
output.outputFile = new File(outputFile.parent, fileName) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment