Kaynağa Gözat

review code

liujiangyao 7 yıl önce
ebeveyn
işleme
db676f2c56
1 değiştirilmiş dosya ile 21 ekleme ve 19 silme
  1. 21 19
      app/build.gradle

+ 21 - 19
app/build.gradle

@@ -64,21 +64,6 @@ android {
         ]
     }
     productFlavors {
-        sheep {
-            applicationId "com.sheep.jiuyan.samllsheep"
-            manifestPlaceholders = [DUANDUAN_GRAPH     : "sheep",
-                                    DUANDUAN_DATASHARE : "sheep",
-                                    jpush_appkey       : "28b74d520261c6f78e3e0921",
-                                    umeng_app_key       : "5ab0a1da8f4a9d742900035f"
-            ]
-            buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"'
-            buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"'
-            buildConfigField "String", "app_name", '"小绵羊"'
-            buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
-            buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"'
-            signingConfig signingConfigs.config
-
-        }
         developSheeptest {
             applicationId "com.sheep.jiuyan.samllsheep"
             manifestPlaceholders = [DUANDUAN_GRAPH     : "sheeptest",
@@ -107,6 +92,21 @@ android {
             buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"'
             signingConfig signingConfigs.config
         }
+        sheep {
+            applicationId "com.sheep.jiuyan.samllsheep"
+            manifestPlaceholders = [DUANDUAN_GRAPH     : "sheep",
+                                    DUANDUAN_DATASHARE : "sheep",
+                                    jpush_appkey       : "28b74d520261c6f78e3e0921",
+                                    umeng_app_key       : "5ab0a1da8f4a9d742900035f"
+            ]
+            buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"'
+            buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"'
+            buildConfigField "String", "app_name", '"小绵羊"'
+            buildConfigField "boolean", "XXTEA_ENCRYPT", 'true'
+            buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"'
+            signingConfig signingConfigs.config
+
+        }
     }
 }
 
@@ -270,10 +270,12 @@ android.applicationVariants.all {
     variant ->
         variant.outputs.each {
             output ->
-                if (productFlavors[0].name == "sheep") {
-                    output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk")
-                } else {
-                    output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name +".apk")
+                if(buildType.name == "release") {
+                    if (productFlavors[0].name == "sheep") {
+                        output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk")
+                    } else {
+                        output.outputFile = new File(output.outputFile.parent, productFlavors[0].name + "_" + buildType.name +".apk")
+                    }
                 }
 
         }