|
|
@@ -29,6 +29,10 @@ android {
|
|
|
versionName rootProject.ext.android.versionName
|
|
|
multiDexEnabled true
|
|
|
signingConfig signingConfigs.config
|
|
|
+
|
|
|
+ // 默认是umeng的渠道
|
|
|
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
|
+ manifestPlaceholders = [UMENG_CHANNEL_VALUE: "umeng"]
|
|
|
}
|
|
|
|
|
|
useLibrary 'org.apache.http.legacy'
|
|
|
@@ -52,16 +56,27 @@ android {
|
|
|
}
|
|
|
}
|
|
|
productFlavors { // Gradle 多渠道打包
|
|
|
- xiaomi {}
|
|
|
+ wandoujia {}
|
|
|
_360 {}
|
|
|
baidu {}
|
|
|
- wandoujia {}
|
|
|
+ xiaomi {}
|
|
|
+ tencent {}
|
|
|
+ taobao {}
|
|
|
}
|
|
|
|
|
|
productFlavors.all {
|
|
|
flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
|
|
|
}
|
|
|
-
|
|
|
+ //给apk添加对应的版本号:这里暂时注释但保留
|
|
|
+// applicationVariants.all { variant ->
|
|
|
+// variant.outputs.each { output ->
|
|
|
+// def outputFile = output.outputFile
|
|
|
+// if (outputFile != null && outputFile.name.endsWith('.apk')) {
|
|
|
+// def fileName = outputFile.name.replace(".apk", "-${defaultConfig.versionName}.apk")
|
|
|
+// output.outputFile = new File(outputFile.parent, fileName)
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
dependencies {
|