From 2d679b14affe84dfa7942905f56cc45a7bbdbd31 Mon Sep 17 00:00:00 2001 From: Vustron Date: Fri, 17 Nov 2023 08:32:50 +0800 Subject: [PATCH] Signed the app --- android/app/build.gradle | 27 ++++++++++++++++++++------- lib/auth/signin.dart | 2 +- lib/auth/signup.dart | 2 +- lib/components/worldtimeContent.dart | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 32e882d..a30d8a3 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -22,6 +22,12 @@ 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_app" compileSdkVersion flutter.compileSdkVersion @@ -52,13 +58,20 @@ android { 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/lib/auth/signin.dart b/lib/auth/signin.dart index f9825ce..15c3e7d 100644 --- a/lib/auth/signin.dart +++ b/lib/auth/signin.dart @@ -223,7 +223,7 @@ class _SignInState extends State { TextButton( onPressed: () => {}, child: Text( - 'Ver.2.2 \u00A9 Made by Vustron Vustronus 2023', + 'Ver.2.3 \u00A9 Made by Vustron Vustronus 2023', style: GoogleFonts.zenDots( fontSize: 7.0, fontWeight: FontWeight.bold, diff --git a/lib/auth/signup.dart b/lib/auth/signup.dart index 9add964..256c5f2 100644 --- a/lib/auth/signup.dart +++ b/lib/auth/signup.dart @@ -172,7 +172,7 @@ class _SignUpState extends State { TextButton( onPressed: () => {}, child: Text( - 'Ver.2.2 \u00A9 Made by Vustron Vustronus 2023', + 'Ver.2.3 \u00A9 Made by Vustron Vustronus 2023', style: GoogleFonts.zenDots( fontSize: 7.0, fontWeight: FontWeight.bold, diff --git a/lib/components/worldtimeContent.dart b/lib/components/worldtimeContent.dart index 1ab8c82..b36583d 100644 --- a/lib/components/worldtimeContent.dart +++ b/lib/components/worldtimeContent.dart @@ -214,7 +214,7 @@ class _WorldTimeContentState extends State { TextButton( onPressed: () => {}, child: Text( - 'Ver.2.2 \u00A9 Made by Vustron Vustronus 2023', + 'Ver.2.3 \u00A9 Made by Vustron Vustronus 2023', style: GoogleFonts.zenDots( fontSize: 7.0, fontWeight: FontWeight.bold,