Browse Source

[new]增加Android打包签名

zk 1 year ago
parent
commit
616fe0d6a6
1 changed files with 16 additions and 1 deletions
  1. 16 1
      android/app/build.gradle

+ 16 - 1
android/app/build.gradle

@@ -44,11 +44,26 @@ android {
         versionName = flutterVersionName
         versionName = flutterVersionName
     }
     }
 
 
+    signingConfigs {
+        debug {
+            storeFile file("keystore/electronic.jks")
+            storePassword "electronic888"
+            keyAlias "electronic"
+            keyPassword "electronic888"
+        }
+        release {
+            storeFile file("keystore/electronic.jks")
+            storePassword "electronic888"
+            keyAlias "electronic"
+            keyPassword "electronic888"
+        }
+    }
+
     buildTypes {
     buildTypes {
         release {
         release {
             // TODO: Add your own signing config for the release build.
             // TODO: Add your own signing config for the release build.
             // Signing with the debug keys for now, so `flutter run --release` works.
             // Signing with the debug keys for now, so `flutter run --release` works.
-            signingConfig = signingConfigs.debug
+            signingConfig signingConfigs.release
         }
         }
     }
     }
 }
 }