From aeefe1a5e7ac6e82e9569c8b8e671bed31682dc7 Mon Sep 17 00:00:00 2001 From: Phil Seeley Date: Tue, 16 Jun 2020 21:21:30 +1000 Subject: [PATCH] Added release signing. --- android/app/build.gradle | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 647bc44..90f117d 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("/home/phil/Documents/key.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + android { compileSdkVersion 28 @@ -37,7 +41,6 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "name.seeley.phil.ecardapp" minSdkVersion 18 targetSdkVersion 28 @@ -46,11 +49,18 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + signingConfigs { + release { + keyAlias keystoreProperties['uploadAlias'] + keyPassword keystoreProperties['uploadPassword'] + 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 } } }