diff --git a/.gitignore b/.gitignore index ac4a90645ca3fd1c36e56061fdcbd0c4119a6052..511b40a73c78d3b030fc17d2839830d64baad3ac 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ **/android/gradlew **/android/gradlew.bat **/android/local.properties +**/android/key.properties **/android/**/GeneratedPluginRegistrant.java # iOS/XCode related diff --git a/android/app/build.gradle b/android/app/build.gradle index 22123cb812c03958af43105fab141684d8c3186e..aac0ff68133db9be41f5467396723557dff5aa9a 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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,6 +47,15 @@ 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. @@ -54,7 +69,7 @@ android { productFlavors { development { dimension "flavor-type" - applicationIdSuffix ".dev" + applicationIdSuffix ".development" versionNameSuffix "-dev" manifestPlaceholders = [appLabel:"Vereign-dev"] }