import java.io.FileInputStream import java.util.Properties 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") } val keystoreProperties = Properties() val keystorePropertiesFile = rootProject.file("key.properties") val hasCustomDebugSigning = keystorePropertiesFile.exists() if (hasCustomDebugSigning) { keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } android { namespace = "com.funymeeai.app" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = JavaVersion.VERSION_17.toString() } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.funymeeai.app" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName } signingConfigs { getByName("debug") { if (hasCustomDebugSigning) { val storeRel = keystoreProperties.getProperty("debug.storeFile") ?: error("key.properties: missing debug.storeFile") storeFile = rootProject.file(storeRel) storePassword = keystoreProperties.getProperty("debug.storePassword") ?: error("key.properties: missing debug.storePassword") keyAlias = keystoreProperties.getProperty("debug.keyAlias") ?: error("key.properties: missing debug.keyAlias") keyPassword = keystoreProperties.getProperty("debug.keyPassword") ?: error("key.properties: missing debug.keyPassword") } } val releaseStoreFile = keystoreProperties.getProperty("release.storeFile")?.trim() if (!releaseStoreFile.isNullOrEmpty()) { create("release") { storeFile = file(releaseStoreFile) storePassword = keystoreProperties.getProperty("release.storePassword") ?: error("key.properties: missing release.storePassword") keyAlias = keystoreProperties.getProperty("release.keyAlias") ?: error("key.properties: missing release.keyAlias") keyPassword = keystoreProperties.getProperty("release.keyPassword") ?: error("key.properties: missing release.keyPassword") } } } buildTypes { release { signingConfig = signingConfigs.findByName("release") ?: signingConfigs.getByName("debug") } } } flutter { source = "../.." }