trcr/android/app/build.gradle.kts

71 lines
2.2 KiB
Text
Raw Normal View History

2025-05-21 07:20:18 -07:00
import java.util.Properties
import java.io.FileInputStream
2025-05-04 17:47:47 -07:00
plugins {
id("com.android.application")
2025-05-10 07:42:54 -07:00
// START: FlutterFire Configuration
id("com.google.gms.google-services")
2025-05-10 07:48:38 -07:00
id("com.google.firebase.crashlytics")
2025-05-10 07:42:54 -07:00
// END: FlutterFire Configuration
2025-05-04 17:47:47 -07:00
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
2025-05-09 22:15:27 -07:00
val backgroundGeolocation = project(":flutter_background_geolocation")
apply { from("${backgroundGeolocation.projectDir}/background_geolocation.gradle") }
2025-05-21 07:20:18 -07:00
val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("../../environment/key.properties")
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
2025-05-04 17:47:47 -07:00
android {
2025-05-11 12:24:58 -07:00
namespace = "org.traccar.client"
2025-05-04 17:47:47 -07:00
compileSdk = flutter.compileSdkVersion
2025-06-10 21:37:07 -07:00
ndkVersion = "27.0.12077973"
2025-05-04 17:47:47 -07:00
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
2025-05-09 22:15:27 -07:00
applicationId = "org.traccar.client"
2025-05-04 17:47:47 -07:00
// 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
}
2025-05-21 07:20:18 -07:00
signingConfigs {
2025-06-05 21:57:29 -07:00
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
}
2025-05-21 07:20:18 -07:00
}
}
2025-05-04 17:47:47 -07:00
buildTypes {
release {
2025-06-05 21:57:29 -07:00
if (keystorePropertiesFile.exists()) {
signingConfig = signingConfigs.getByName("release")
}
2025-05-09 22:15:27 -07:00
isShrinkResources = false
2025-05-04 17:47:47 -07:00
}
}
}
flutter {
source = "../.."
}