android { ...
buildTypes { debug { ...
}
release {
...
} applicationVariants.all { variant -> variant.outputs.each { output -> def apkName = "" def formattedDate = new Date().format('yyyyMMdd') if (variant.buildType.name == "release"){ apkName = "AppName_" + variant.versionName + "_" + formattedDate + ".apk" }else{ apkName = "AppName_dev" + variant.versionName + "_" + formattedDate + ".apk" } output.outputFile = new File(output.outputFile.parent, apkName) } }
}
댓글
댓글 쓰기