Files
sf-app-platform/apps/mobile_app/android/app/build.gradle.kts
JulianAlcala 95a03434ca fix(antelop): route FCM pushes through SDK, per-flavor plist on iOS, unify applicationId
- Add AntelopAwareMessagingService so the Antelop SDK gets first dibs on every
  FCM push before delegating to firebase_messaging. Unblocks SCA wallet
  activation on Android, which was waiting forever for pushes that the
  FlutterFirebaseMessagingService was swallowing ever since Firebase was
  integrated. Remove the stock Antelop and firebase_messaging services via
  manifest-merge so only the wrapper handles MESSAGING_EVENT.
- Add Copy AntelopRelease Build Phase in Xcode to copy
  Runner/AntelopRelease-{flavor}.plist over the fixed AntelopRelease.plist
  inside the .app bundle based on CONFIGURATION. Without this the iOS SDK
  silently used the production plist on every flavor.
- Revert the six applicationId values (3 AndroidManifest + 3 AntelopRelease
  plist) to the sample id 4713640103500149457, which is the only one
  provisioned in Antelop's backend today. The four env+platform ids they
  provided all fail with 9999 / cryptography: Error while decrypting data.
  To be updated once Treezor confirms the real ids.
- Add packages/flutter_treezor_entrust_sdk_bridge/example as a pub workspace
  member and bump its Dart SDK and flutter_lints constraints so
  'melos bootstrap' stops failing with 'dependencies for
  flutter_treezor_entrust_sdk_bridge_example missing'.
2026-04-15 11:25:06 +02:00

111 lines
3.4 KiB
Kotlin

import java.util.Properties
import java.io.FileInputStream
plugins {
id("com.android.application")
// START: FlutterFire Configuration
id("com.google.gms.google-services")
id("com.google.firebase.firebase-perf")
id("com.google.firebase.crashlytics")
// END: FlutterFire Configuration
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "com.savefamily.app"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
// Required by flutter_local_notifications (and any future libs that
// need Java 8+ APIs on older Android API levels).
isCoreLibraryDesugaringEnabled = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
applicationId = "com.savefamily.app"
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
packaging {
jniLibs {
keepDebugSymbols.add("*/*/libscm.so")
useLegacyPackaging = true
}
}
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String?
keyPassword = keystoreProperties["keyPassword"] as String?
storeFile = keystoreProperties["storeFile"]?.let { file(it as String) }
storePassword = keystoreProperties["storePassword"] as String?
}
}
buildTypes {
release {
signingConfig = signingConfigs.getByName("release")
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 = ".stag"
resValue("string", "app_name", "SF Staging")
}
create("production") {
dimension = "app"
resValue("string", "app_name", "SaveFamily")
}
}
}
flutter {
source = "../.."
}
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
// Required by AntelopAwareMessagingService to forward FCM pushes to the
// Antelop SDK. The Antelop AAR (com.entrust.antelop:antelop) is brought
// in transitively through the flutter_treezor_entrust_sdk_bridge plugin.
implementation(platform("com.google.firebase:firebase-bom:33.4.0"))
implementation("com.google.firebase:firebase-messaging")
implementation("com.entrust.antelop:antelop:2.6.4")
}