import java.io.FileInputStream import java.util.Properties plugins { id("com.android.application") // START: FlutterFire Configuration id("com.google.gms.google-services") // END: FlutterFire Configuration id("kotlin-android") id("dev.flutter.flutter-gradle-plugin") } // ── Release signing ────────────────────────────────────────────────────────── // Create android/key.properties (see android/key.properties.example) pointing // to your own upload keystore. Release builds are NEVER signed with the debug key. val keystorePropertiesFile = rootProject.file("key.properties") val keystoreProperties = Properties() if (keystorePropertiesFile.exists()) { keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } android { namespace = "com.farmlink.marketplace" compileSdk = 36 ndkVersion = flutter.ndkVersion compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } defaultConfig { // Change this to your own unique application id before publishing. applicationId = "com.farmlink.marketplace" minSdk = 23 targetSdk = 36 versionCode = flutter.versionCode versionName = flutter.versionName } signingConfigs { create("release") { if (keystorePropertiesFile.exists()) { keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["keyPassword"] as String storeFile = file(keystoreProperties["storeFile"] as String) storePassword = keystoreProperties["storePassword"] as String } } } buildTypes { release { // Signed with your own release keystore only (android/key.properties). // Without key.properties the release build is produced unsigned. signingConfig = if (keystorePropertiesFile.exists()) { signingConfigs.getByName("release") } else { null } isMinifyEnabled = false isShrinkResources = false } } } dependencies { coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") } kotlin { compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17) } } flutter { source = "../.." }