diff --git a/.gitignore b/.gitignore index 47e0b4d..c1017ee 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ build/ **/android/gradlew.bat **/android/local.properties **/android/**/GeneratedPluginRegistrant.java +**/android/key.properties # iOS/XCode related **/ios/**/*.mode1v3 diff --git a/android/app/build.gradle b/android/app/build.gradle index 63d961e..324e71f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,6 +25,10 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +def keystorePropertiesFile = rootProject.file("key.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + android { compileSdkVersion 27 @@ -45,11 +49,19 @@ android { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { - release { - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } + release { + signingConfig signingConfigs.release + } } }