android{
  applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def outputFile = output.outputFile
            if (outputFile != null && outputFile.name.endsWith('.apk')) {
                def dirName = APP_OUTPUT_DIR + "v${defaultConfig.versionName}"
                def fileName = outputFile.name.replace(".apk", "-${defaultConfig.versionName}.apk")
                output.outputFile = new File(dirName, fileName)
            }
        }
    }

APP_OUTPUT_DIRgradle.properties,如:

#小盘beta版 输出路径
APP_OUTPUT_DIR = F\:\\100bei\\xiaopan\\dev\\