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.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 backgroundGeolocation = project(":flutter_background_geolocation") apply { from("${backgroundGeolocation.projectDir}/background_geolocation.gradle") } val keystoreProperties = Properties() val keystorePropertiesFile = rootProject.file("../../environment/key.properties") if (keystorePropertiesFile.exists()) { keystoreProperties.load(FileInputStream(keystorePropertiesFile)) } android { namespace = "org.traccar.client" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() } defaultConfig { applicationId = "org.traccar.client" // 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 { if (keystorePropertiesFile.exists()) { create("release") { keyAlias = keystoreProperties["keyAlias"] as String keyPassword = keystoreProperties["keyPassword"] as String storeFile = keystoreProperties["storeFile"]?.let { file(it) } storePassword = keystoreProperties["storePassword"] as String } } } buildTypes { release { if (keystorePropertiesFile.exists()) { signingConfig = signingConfigs.getByName("release") } isShrinkResources = false } } lint { disable.add("NullSafeMutableLiveData") } } dependencies { implementation("org.slf4j:slf4j-api:2.0.17") implementation("com.github.tony19:logback-android:3.0.0") } flutter { source = "../.." }