android{
......
applicationVariants.all { variant->
variant.outputs.each { output->
def oldFile = output.outputFile
if(variant.buildType.name.equals('release')){
def releaseApkName = applicationId + '_' + versionName + '_' + variant.productFlavors[0].name + '.apk'
output.outputFile = new File(oldFile.parent, releaseApkName)
}
}
}
......
}
网友评论