diff --git a/android/app/build.gradle b/android/app/build.gradle index 6253c65..c0dde8f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -6,6 +6,7 @@ if (localPropertiesFile.exists()) { } } + def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") @@ -25,6 +26,12 @@ 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 31 @@ -40,18 +47,29 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.cloudsolutions.tangheem" minSdkVersion 19 - targetSdkVersion 30 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + targetSdkVersion 31 + versionCode 1 + versionName "1.0.0" multiDexEnabled true } - buildTypes { + signingConfigs { release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { + debug { signingConfig signingConfigs.debug } + release { + minifyEnabled true + shrinkResources true + signingConfig signingConfigs.release + } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 7cf5d1c..b3193d9 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -22,6 +22,7 @@ android:hardwareAccelerated="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" + android:exported="true" android:windowSoftInputMode="adjustResize">