Commit 22987824 by patpat

gradle配置

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