feat: add multi-environment support (development, staging, production)
- Replace dotenv with compile-time dart-define-from-file config per flavor - Add Android product flavors with applicationIdSuffix and per-flavor AndroidManifest - Add iOS build configurations, schemes, per-flavor plists and entitlements - Configure ProGuard rules for R8 compatibility with Entrust/Antelop SDK - Restructure assets into shared/ and per-flavor directories - Generate per-flavor launcher icons for Android and iOS - Refactor app initialization into initApp() with per-flavor entry points - Update asset paths across auth, home, profile, splash modules and sf_shared
@@ -1,2 +0,0 @@
|
||||
API_BASE_URL=https://api-neki-b2b.neki.es/gateway/api/
|
||||
API_ORIGIN =https://neki-b2b.neki.es
|
||||
@@ -39,6 +39,31 @@ android {
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
||||
}
|
||||
debug {
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions += "app"
|
||||
|
||||
productFlavors {
|
||||
create("development") {
|
||||
dimension = "app"
|
||||
applicationIdSuffix = ".dev"
|
||||
resValue("string", "app_name", "SF Dev")
|
||||
}
|
||||
create("staging") {
|
||||
dimension = "app"
|
||||
applicationIdSuffix = ".staging"
|
||||
resValue("string", "app_name", "SF Staging")
|
||||
}
|
||||
create("production") {
|
||||
dimension = "app"
|
||||
resValue("string", "app_name", "SaveFamily")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
23
apps/mobile_app/android/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Flutter wrapper
|
||||
-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.** { *; }
|
||||
-dontwarn io.flutter.embedding.**
|
||||
|
||||
## Antelop/Entrust SDK - suppress warnings for optional dependencies
|
||||
-dontwarn com.google.android.gms.location.FusedLocationProviderClient
|
||||
-dontwarn com.google.android.gms.location.LocationServices
|
||||
-dontwarn com.huawei.hmf.tasks.Task
|
||||
-dontwarn com.huawei.hmf.tasks.Tasks
|
||||
-dontwarn com.huawei.hms.aaid.HmsInstanceId
|
||||
-dontwarn com.huawei.hms.api.HuaweiApiAvailability
|
||||
-dontwarn com.huawei.hms.api.HuaweiServicesNotAvailableException
|
||||
-dontwarn com.huawei.hms.api.HuaweiServicesRepairableException
|
||||
-dontwarn com.huawei.hms.common.ApiException
|
||||
-dontwarn com.huawei.hms.location.FusedLocationProviderClient
|
||||
-dontwarn com.huawei.hms.location.LocationServices
|
||||
-dontwarn com.huawei.hms.push.RemoteMessage
|
||||
-dontwarn com.huawei.hms.security.SecComponentInstallWizard
|
||||
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application>
|
||||
<meta-data
|
||||
android:name="fr.antelop.application_id"
|
||||
android:value="4713640103500149457" />
|
||||
<meta-data
|
||||
android:name="fr.antelop.issuer_id"
|
||||
android:value="treezor" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
After Width: | Height: | Size: 513 B |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 69 B |
|
After Width: | Height: | Size: 684 B |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 1021 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 69 B |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground>
|
||||
<inset
|
||||
android:drawable="@drawable/ic_launcher_foreground"
|
||||
android:inset="16%" />
|
||||
</foreground>
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
@@ -6,17 +6,10 @@
|
||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||
|
||||
<application
|
||||
android:label="SaveFamily"
|
||||
android:label="@string/app_name"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
|
||||
<meta-data
|
||||
android:name="fr.antelop.application_id"
|
||||
android:value="4713640103500149457" />
|
||||
<meta-data
|
||||
android:name="fr.antelop.issuer_id"
|
||||
android:value="treezor" />
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application>
|
||||
<meta-data
|
||||
android:name="fr.antelop.application_id"
|
||||
android:value="4713640103500149457" />
|
||||
<meta-data
|
||||
android:name="fr.antelop.issuer_id"
|
||||
android:value="treezor" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
After Width: | Height: | Size: 515 B |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 334 B |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 69 B |
|
After Width: | Height: | Size: 684 B |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 69 B |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground>
|
||||
<inset
|
||||
android:drawable="@drawable/ic_launcher_foreground"
|
||||
android:inset="16%" />
|
||||
</foreground>
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
10
apps/mobile_app/android/app/src/staging/AndroidManifest.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application>
|
||||
<meta-data
|
||||
android:name="fr.antelop.application_id"
|
||||
android:value="4713640103500149457" />
|
||||
<meta-data
|
||||
android:name="fr.antelop.issuer_id"
|
||||
android:value="treezor" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
After Width: | Height: | Size: 513 B |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 69 B |
|
After Width: | Height: | Size: 684 B |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1021 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 69 B |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground>
|
||||
<inset
|
||||
android:drawable="@drawable/ic_launcher_foreground"
|
||||
android:inset="16%" />
|
||||
</foreground>
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
BIN
apps/mobile_app/assets/development/ic_logo.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
apps/mobile_app/assets/development/ic_logo_background.png
Executable file
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 66 KiB |
BIN
apps/mobile_app/assets/production/ic_logo.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 469 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 945 B After Width: | Height: | Size: 945 B |
BIN
apps/mobile_app/assets/staging/ic_logo.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
apps/mobile_app/assets/staging/ic_logo_background.png
Executable file
|
After Width: | Height: | Size: 6.0 KiB |
5
apps/mobile_app/config/development.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": "development",
|
||||
"apiBaseUrl": "https://api-neki-b2b.neki.es/gateway/api/",
|
||||
"apiOrigin": "https://neki-b2b.neki.es"
|
||||
}
|
||||
5
apps/mobile_app/config/production.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": "production",
|
||||
"apiBaseUrl": "https://api-neki-b2b.neki.es/gateway/api/",
|
||||
"apiOrigin": "https://neki-b2b.neki.es"
|
||||
}
|
||||
5
apps/mobile_app/config/staging.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"env": "staging",
|
||||
"apiBaseUrl": "https://api-neki-b2b.neki.es/gateway/api/",
|
||||
"apiOrigin": "https://neki-b2b.neki.es"
|
||||
}
|
||||
11
apps/mobile_app/flutter_launcher_icons-development.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
flutter_launcher_icons:
|
||||
android: true
|
||||
ios: true
|
||||
image_path: "assets/development/ic_logo.png"
|
||||
image_path_android: "assets/development/ic_logo.png"
|
||||
image_path_ios: "assets/development/ic_logo.png"
|
||||
adaptive_icon_background: "assets/development/ic_logo_background.png"
|
||||
adaptive_icon_foreground: "assets/development/ic_logo.png"
|
||||
min_sdk_android: 21
|
||||
background_color_ios: "#FFFFFF"
|
||||
remove_alpha_ios: true
|
||||
11
apps/mobile_app/flutter_launcher_icons-production.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
flutter_launcher_icons:
|
||||
android: true
|
||||
ios: true
|
||||
image_path: "assets/production/ic_logo.png"
|
||||
image_path_android: "assets/production/ic_logo.png"
|
||||
image_path_ios: "assets/production/ic_logo.png"
|
||||
adaptive_icon_background: "assets/production/ic_logo_background.png"
|
||||
adaptive_icon_foreground: "assets/production/ic_logo.png"
|
||||
min_sdk_android: 21
|
||||
background_color_ios: "#FFFFFF"
|
||||
remove_alpha_ios: true
|
||||
11
apps/mobile_app/flutter_launcher_icons-staging.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
flutter_launcher_icons:
|
||||
android: true
|
||||
ios: true
|
||||
image_path: "assets/staging/ic_logo.png"
|
||||
image_path_android: "assets/staging/ic_logo.png"
|
||||
image_path_ios: "assets/staging/ic_logo.png"
|
||||
adaptive_icon_background: "assets/staging/ic_logo_background.png"
|
||||
adaptive_icon_foreground: "assets/staging/ic_logo.png"
|
||||
min_sdk_android: 21
|
||||
background_color_ios: "#FFFFFF"
|
||||
remove_alpha_ios: true
|
||||
@@ -1,10 +0,0 @@
|
||||
flutter_launcher_icons:
|
||||
android: true
|
||||
ios: true
|
||||
image_path: "assets/logos/logo_splash.png"
|
||||
image_path_android: "assets/images/logos/logo_splash.png"
|
||||
image_path_ios: "assets/images/logos/logo_splash.png"
|
||||
adaptive_icon_background: "assets/images/logos/ic_logo_background.png"
|
||||
adaptive_icon_foreground: "assets/images/logos/logo_splash.png"
|
||||
min_sdk_android: 21
|
||||
background_color_ios: "#FFFFFF"
|
||||
15
apps/mobile_app/flutter_native_splash.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
flutter_native_splash:
|
||||
fullscreen: true
|
||||
color: "#F7F7F7"
|
||||
image: assets/shared/images/logo_splash.png
|
||||
android_gravity: center
|
||||
ios_content_mode: scaleAspectFit
|
||||
|
||||
android: true
|
||||
ios: true
|
||||
web: false
|
||||
|
||||
android_12:
|
||||
color: "#F7F7F7"
|
||||
icon_background_color: "#F7F7F7"
|
||||
image: assets/shared/images/logo_splash.png
|
||||
@@ -1,2 +1,5 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-development.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-staging.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug-production.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -1,2 +1,8 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-development.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-staging.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release-production.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-development.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-staging.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile-production.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
||||
@@ -5,9 +5,15 @@ platform :ios, '13.4'
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
'Debug-development' => :debug,
|
||||
'Debug-staging' => :debug,
|
||||
'Debug-production' => :debug,
|
||||
'Profile-development' => :release,
|
||||
'Profile-staging' => :release,
|
||||
'Profile-production' => :release,
|
||||
'Release-development' => :release,
|
||||
'Release-staging' => :release,
|
||||
'Release-production' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
|
||||