Skip to content
Permalink
Browse files

add build apk config

  • Loading branch information...
xch1029 committed Jul 29, 2019
1 parent 634a75f commit d2094e2f4182da22f9b3f767295b134fee578bf2
Showing with 24 additions and 7 deletions.
  1. +19 −7 android/app/build.gradle
  2. BIN android/app/key.jks
  3. +5 −0 android/key.properties
@@ -24,6 +24,12 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 28

@@ -41,13 +47,19 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

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
}
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}

flutter {
BIN +2.14 KB android/app/key.jks
Binary file not shown.
@@ -0,0 +1,5 @@
# Note: Keep the key.properties file private; do not check it into public source control.
storePassword=123456
keyPassword=123456
keyAlias=key
storeFile=key.jks

0 comments on commit d2094e2

Please sign in to comment.
You can’t perform that action at this time.