Browse Source

修改app签名问题

weizhengliang 10 months ago
parent
commit
bac3411782
1 changed files with 18 additions and 6 deletions
  1. 18 6
      app/build.gradle

+ 18 - 6
app/build.gradle

@@ -60,8 +60,12 @@ android {
 
     buildTypes {
         release {
-            if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
-                signingConfig signingConfigs.debug_g6s
+            if ("yd_watch_2" == app_device_type) {
+                if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
+                    signingConfig signingConfigs.debug_g6s
+                } else {
+                    signingConfig signingConfigs.debug
+                }
             } else {
                 signingConfig signingConfigs.debug
             }
@@ -70,8 +74,12 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
         debug {
-            if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
-                signingConfig signingConfigs.debug_g6s
+            if ("yd_watch_2" == app_device_type) {
+                if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
+                    signingConfig signingConfigs.debug_g6s
+                } else {
+                    signingConfig signingConfigs.debug
+                }
             } else {
                 signingConfig signingConfigs.debug
             }
@@ -84,8 +92,12 @@ android {
     sourceSets {
         main.java.srcDirs += 'src/main/code'
 
-        if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
-            main.manifest.srcFile 'src/main/sharedUserId/AndroidManifest.xml'
+        if ("yd_watch_2" == app_device_type) {
+            if (rootProject.ext.watch_type == "g6s" || rootProject.ext.watch_type == "asr") {
+                main.manifest.srcFile 'src/main/sharedUserId/AndroidManifest.xml'
+            } else {
+                main.manifest.srcFile 'src/main/AndroidManifest.xml'
+            }
         } else {
             main.manifest.srcFile 'src/main/AndroidManifest.xml'
         }