From a7c9a2281c4c45edbdb65608df789e1a1cc8bc78 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 25 Jun 2025 16:52:16 +0800 Subject: [PATCH] :hammer: Update android building settings --- android/app/build.gradle.kts | 23 ++++++++++++++---- android/app/src/main/AndroidManifest.xml | 24 +++++++++---------- .../app/src/main/res/values-night/styles.xml | 4 ++-- android/app/src/main/res/values/styles.xml | 4 ++-- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index ee8d29b..600a60d 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,3 +1,6 @@ +import java.util.Properties +import java.io.FileInputStream + plugins { id("com.android.application") // START: FlutterFire Configuration @@ -8,6 +11,12 @@ plugins { id("dev.flutter.flutter-gradle-plugin") } +val keystoreProperties = Properties() +val keystorePropertiesFile = rootProject.file("key.properties") +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(FileInputStream(keystorePropertiesFile)) +} + android { namespace = "dev.solsynth.solian" compileSdk = flutter.compileSdkVersion @@ -31,11 +40,11 @@ android { } signingConfigs { - release { - keyAlias = keystoreProperties['keyAlias'] - keyPassword = keystoreProperties['keyPassword'] - storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null - storePassword = keystoreProperties['storePassword'] + create("release") { + keyAlias = keystoreProperties["keyAlias"] as String + keyPassword = keystoreProperties["keyPassword"] as String + storeFile = keystoreProperties["storeFile"]?.let { file(it) } + storePassword = keystoreProperties["storePassword"] as String } } @@ -48,6 +57,10 @@ android { } } +dependencies { + implementation("com.google.android.material:material:1.12.0") +} + flutter { source = "../.." } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a181ac2..6ec6d4d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -41,6 +41,18 @@ + + + + + + + + + + + + @@ -58,18 +70,6 @@ - - - - - - - - - - - - - diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 0d1fa8f..1276f99 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -