From efa0c587b84419b6b128b4d7065d3443067c935b Mon Sep 17 00:00:00 2001 From: Juan Gilsanz Polo Date: Thu, 22 Feb 2024 14:10:59 +0100 Subject: [PATCH] Update android config --- android/app/build.gradle | 33 ++++++++++++------- android/app/src/main/AndroidManifest.xml | 18 +++++----- .../com/example/my_linkding/MainActivity.kt | 2 +- android/key.properties.sample | 4 +++ 4 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 android/key.properties.sample diff --git a/android/app/build.gradle b/android/app/build.gradle index d6f4a8c..4b14271 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,9 +22,16 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + + android { - namespace "com.example.my_linkding" - compileSdkVersion flutter.compileSdkVersion + namespace "com.jgeek00.my_linkding" + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { @@ -41,21 +48,25 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.my_linkding" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion + applicationId "com.jgeek00.my_linkding" + minSdkVersion 26 + targetSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + 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 } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 6145727..93681b4 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,8 @@ - + + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> - - + +