From 5bde0d383e6cec38764587992aa793412968a2b6 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Tue, 21 Sep 2021 12:55:13 +0200 Subject: [PATCH] prepare for release --- android/app/build.gradle | 29 ++++++++++++++----- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 4 +-- .../com/example/notes_app/MainActivity.kt | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 881275c..4390990 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,6 +25,13 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' 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 30 @@ -34,20 +41,26 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.notes_app" + applicationId "com.emamaker.simplenotes" minSdkVersion 16 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } - 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 keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { + release { + signingConfig signingConfigs.release + } + } } flutter { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index d804b81..ceb2357 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.emamaker.simplenotes"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9814ece..0711082 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="com.emamaker.simplenotes"> + package="com.emamaker.simplenotes">