Commit 22987824 by patpat

gradle配置

parent 7e8f219a
......@@ -10,8 +10,8 @@ android {
applicationId "com.bgycc.smartcanteen"
minSdkVersion 21
targetSdkVersion 22
versionCode 7
versionName "1.0.7"
versionCode 8
versionName "1.0.8"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
......@@ -47,6 +47,17 @@ android {
// but continue the build even when errors are found:
abortOnError false
}
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"
}
}
}
}
dependencies {
......
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