plugins { // AGP 9 has Kotlin built in. id("com.android.application") version "9.4.1" } android { namespace = "org.opentracker" compileSdk = 36 defaultConfig { applicationId = "org.opentracker" // Android 12: GNSS batching and the modern LocationRequest. minSdk = 31 targetSdk = 36 versionCode = 1 versionName = "0.1.0" } // Without ANDROID_KEYSTORE, assembleRelease builds an unsigned APK. val keystore = providers.environmentVariable("ANDROID_KEYSTORE").orNull val releaseSigning = keystore?.let { signingConfigs.create("release") { storeFile = file(it) storePassword = providers.environmentVariable("ANDROID_KEYSTORE_PASSWORD").get() keyAlias = providers.environmentVariable("ANDROID_KEY_ALIAS").get() // PKCS12 has one password for the store and the key. keyPassword = storePassword } } buildTypes { debug { applicationIdSuffix = ".debug" // The emulator reaches a dev server on the host as http://10.0.2.2:8080. manifestPlaceholders["cleartext"] = "true" } release { isMinifyEnabled = false manifestPlaceholders["cleartext"] = "false" signingConfig = releaseSigning } } compileOptions { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } lint { disable += setOf( // Upgrades are a decision, not a lint finding. "OldTargetApi", "GradleDependency", "AndroidGradlePluginVersion", "NewerVersionAvailable", ) warningsAsErrors = true } testOptions { unitTests.isReturnDefaultValues = true } } dependencies { implementation("androidx.browser:browser:1.10.0") // Must match the Kotlin version that AGP bundles: ./gradlew :app:buildEnvironment | grep kotlin-gradle-plugin testImplementation("org.jetbrains.kotlin:kotlin-test-junit:2.2.10") }