Commit 341a4aca by pye52

不再固定输出目录

parent f34cba96
...@@ -48,15 +48,14 @@ android { ...@@ -48,15 +48,14 @@ android {
// but continue the build even when errors are found: // but continue the build even when errors are found:
abortOnError false abortOnError false
} }
// 命名生成的apk
applicationVariants.all { variant -> applicationVariants.all { variant ->
if (variant.buildType.name != "debug") { if (variant.buildType.name != "debug") {
variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/apk") variant.getPackageApplicationProvider()
variant.getPackageApplicationProvider().get().outputScope.apkDatas.forEach { apkData -> .get()
apkData.outputFileName = "SmartCanteen" + .outputScope
"_" + variant.buildType.name + .apkDatas
"_v" + variant.versionName + ".apk" .forEach { apkData -> apkData.outputFileName = "SmartCanteen" + "_v" + variant.versionName + ".apk" }
}
} }
} }
compileOptions { 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