Commit 341a4aca by pye52

不再固定输出目录

parent f34cba96
......@@ -48,15 +48,14 @@ android {
// but continue the build even when errors are found:
abortOnError false
}
// 命名生成的apk
applicationVariants.all { variant ->
if (variant.buildType.name != "debug") {
variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/apk")
variant.getPackageApplicationProvider().get().outputScope.apkDatas.forEach { apkData ->
apkData.outputFileName = "SmartCanteen" +
"_" + variant.buildType.name +
"_v" + variant.versionName + ".apk"
}
variant.getPackageApplicationProvider()
.get()
.outputScope
.apkDatas
.forEach { apkData -> apkData.outputFileName = "SmartCanteen" + "_v" + variant.versionName + ".apk" }
}
}
compileOptions {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment