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
@@ -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 |