plugins { id("com.android.application") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id("dev.flutter.flutter-gradle-plugin") } // Local builds remain possible without Firebase. CI applies this plugin when // the repository's google-services.json secret has been configured. if (file("google-services.json").exists()) { apply(plugin = "com.google.gms.google-services") } val releaseKeystorePath = System.getenv("ANDROID_KEYSTORE_PATH") val releaseKeystorePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD") val releaseKeyAlias = System.getenv("ANDROID_KEY_ALIAS") val releaseKeyPassword = System.getenv("ANDROID_KEY_PASSWORD") val hasReleaseSigning = listOf( releaseKeystorePath, releaseKeystorePassword, releaseKeyAlias, releaseKeyPassword, ).all { !it.isNullOrBlank() } android { namespace = "lk.tmrecharge.whatsapp_agent" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "lk.tmrecharge.whatsapp_agent" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = maxOf(flutter.minSdkVersion, 23) targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName } signingConfigs { if (hasReleaseSigning) { create("release") { storeFile = file(releaseKeystorePath!!) storePassword = releaseKeystorePassword keyAlias = releaseKeyAlias keyPassword = releaseKeyPassword } } } buildTypes { release { // CI uses a persistent release key when all signing variables are // present. Local/test builds remain installable with the debug key. signingConfig = if (hasReleaseSigning) { signingConfigs.getByName("release") } else { signingConfigs.getByName("debug") } } } } dependencies { implementation("androidx.core:core-ktx:1.17.0") coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4") } kotlin { compilerOptions { jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 } } flutter { source = "../.." }