plugins { id("com.android.application") id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } android { namespace = "com.mybestie.mitra" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } defaultConfig { // Base Application ID. Per-flavor suffixes are applied below in // productFlavors (dev → .dev, staging → .staging, prod → no suffix). applicationId = "com.mybestie.mitra" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = 24 targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName } // Build flavors: dev / staging / prod. Each gets its own applicationId // (so all three can be installed side-by-side) and its own app_name string // resource (consumed by AndroidManifest's android:label="@string/app_name"). // A bare `flutter build`/`flutter run` WITHOUT --flavor now fails — every // command must pass --flavor and the matching -t entrypoint. flavorDimensions += "env" productFlavors { create("dev") { dimension = "env" applicationIdSuffix = ".dev" resValue("string", "app_name", "Mitra HaloBestie Dev") } create("staging") { dimension = "env" applicationIdSuffix = ".staging" resValue("string", "app_name", "Mitra HaloBestie Staging") } create("prod") { dimension = "env" // No applicationIdSuffix — prod keeps the base com.mybestie.mitra. resValue("string", "app_name", "Mitra HaloBestie") } } 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.getByName("debug") } } } dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") } flutter { source = "../.." }