瀏覽代碼

upload apk

ditclear 7 年之前
父節點
當前提交
5e669a26d5
共有 5 個文件被更改,包括 19 次插入1 次删除
  1. 2 0
      .gitignore
  2. 3 0
      README.md
  3. 二進制
      android.png
  4. 14 1
      android/app/build.gradle
  5. 二進制
      android/release-keystore.jks

+ 2 - 0
.gitignore

@@ -69,3 +69,5 @@ build/
 !**/ios/**/default.pbxuser
 !**/ios/**/default.perspectivev3
 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
+/android/release-keystore.jks
+/android/key.properties

+ 3 - 0
README.md

@@ -20,6 +20,9 @@ Build MVVM App for Android and IOS with Flutter。
     └── home.dart
 
 ```
+##### 下载体验
+
+![](android.png)
 
 #### dependencies
 

二進制
android.png


+ 14 - 1
android/app/build.gradle

@@ -21,6 +21,10 @@ if (flutterVersionName == null) {
     flutterVersionName = '1.0'
 }
 
+def keystorePropertiesFile = rootProject.file("key.properties")
+def keystoreProperties = new Properties()
+keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+
 apply plugin: 'com.android.application'
 apply plugin: 'kotlin-android'
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
@@ -46,11 +50,20 @@ android {
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
+    signingConfigs {
+        release {
+            keyAlias keystoreProperties['keyAlias']
+            keyPassword keystoreProperties['keyPassword']
+            storeFile file(keystoreProperties['storeFile'])
+            storePassword keystoreProperties['storePassword']
+        }
+    }
+
     buildTypes {
         release {
             // TODO: Add your own signing config for the release build.
             // Signing with the debug keys for now, so `flutter run --release` works.
-            signingConfig signingConfigs.debug
+            signingConfig signingConfigs.release
         }
     }
 }

二進制
android/release-keystore.jks