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
This commit is contained in:
2026-03-01 00:12:47 +01:00
parent 213279de18
commit ef0abc2f85
226 changed files with 1751 additions and 252 deletions

View File

@@ -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")
}
}
}

View 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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

File diff suppressed because one or more lines are too long