import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { id("com.android.application") id("org.jetbrains.kotlin.plugin.compose") } android { namespace = "dev.iris.app" compileSdk = 37 defaultConfig { applicationId = "dev.iris.app" minSdk = 29 targetSdk = 34 versionCode = 1 // CI passes -PappVersion= (release workflow); local builds // keep the default. versionName = (project.findProperty("appVersion") as? String) ?: "0.1.0" } buildTypes { release { isMinifyEnabled = false } } // CI release signing: .gitea/workflows/release.yml restores a keystore // from Gitea secrets and exports ANDROID_KEYSTORE_* env vars (see // scripts/make_release_keystore.sh). Without them the release build stays // unsigned and the workflow falls back to a debug APK. val ciKeystore = System.getenv("ANDROID_KEYSTORE_FILE") if (ciKeystore != null) { signingConfigs { create("release") { storeFile = file(ciKeystore) storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD") keyAlias = System.getenv("ANDROID_KEY_ALIAS") keyPassword = System.getenv("ANDROID_KEY_PASSWORD") } } buildTypes { release { signingConfig = signingConfigs.getByName("release") } } } compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } // targetSdk is deliberately pinned to 34 (a stable API level): the // reference device is API 29 and API 37 (the only newer installed // platform) is a preview SDK, which is not appropriate to target for a // stable build. Silence the informational OldTargetApi hint. lint { disable += "OldTargetApi" } } kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_17) } } dependencies { implementation(project(":shared")) implementation(platform("androidx.compose:compose-bom:2026.08.00")) implementation("androidx.compose.material3:material3") implementation("androidx.compose.ui:ui") implementation("androidx.activity:activity-compose:1.13.0") implementation("androidx.core:core-splashscreen:1.2.0") } // M5: apply the google-services plugin only when a Firebase project is // configured (google-services.json present). Without it the FCM service is // inert and the ntfy listener is the push path. if (file("google-services.json").exists()) { apply(plugin = "com.google.gms.google-services") }