From aaebb26d778f9337fd3eb31a6843055ccb91f799 Mon Sep 17 00:00:00 2001 From: misakajimmy Date: Fri, 20 Jan 2023 15:10:09 +0800 Subject: [PATCH] DEV UPDATE:First realeas --- android/app/build.gradle | 25 +++++++++++++++++-- android/app/proguard-rules.pro | 6 +++++ android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 2 +- .../com/example/eoe_fans/MainActivity.kt | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- linux/CMakeLists.txt | 2 +- 7 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 android/app/proguard-rules.pro diff --git a/android/app/build.gradle b/android/app/build.gradle index 4e835c5..34ff617 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,6 +25,10 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +def keystorePropertiesFile = rootProject.file("key.properties") +def keystoreProperties = new Properties() +keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) + android { compileSdkVersion 33 compileSdkVersion flutter.compileSdkVersion @@ -45,7 +49,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.eoe_fans" + applicationId "com.app.eoe_fans" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. minSdkVersion flutter.minSdkVersion @@ -54,11 +58,28 @@ android { versionName flutterVersionName } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + + keyPassword keystoreProperties['keyPassword'] + + storeFile file(keystoreProperties['storeFile']) + + 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 + + minifyEnabled true +// useProguard true +// +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..901ca89 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,6 @@ +-keep class io.flutter.app.** { *; } +-keep class io.flutter.plugin.** { *; } +-keep class io.flutter.util.** { *; } +-keep class io.flutter.view.** { *; } +-keep class io.flutter.** { *; } +-keep class io.flutter.plugins.** { *; } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index f403d28..2fdfd48 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.app.eoe_fans">