import org.jetbrains.kotlin.gradle.dsl.JvmTarget import java.util.Properties plugins { alias(libs.plugins.androidApplication) alias(libs.plugins.composeMultiplatform) alias(libs.plugins.composeCompiler) // Used for App Distribution alias(libs.plugins.googleServices) apply false } // Apply Google Services only when the Firebase config is present: google-services.json is not // tracked in git (see google-services.example.json), so builds must work without it. if (file("google-services.json").exists()) { apply(plugin = libs.plugins.googleServices.get().pluginId) } kotlin { compilerOptions { jvmTarget = JvmTarget.JVM_11 } } dependencies { implementation(projects.shared) // Compose implementation(libs.androidx.activity.compose) implementation(libs.compose.uiToolingPreview) debugImplementation(libs.compose.uiTooling) // Crash logging implementation(libs.glitchtips) } android { namespace = "bzh.ajaury.chombev" compileSdk = libs.versions.androidCompileSdk .get() .toInt() defaultConfig { applicationId = "bzh.ajaury.chombev" minSdk = libs.versions.androidMinSdk .get() .toInt() targetSdk = libs.versions.androidTargetSdk .get() .toInt() versionCode = 1 versionName = "1.0.0-alpha01" // Crash-reporting DSN, kept out of the public repo: read from local.properties // (glitchtip.dsn=...). Empty when absent, which disables the Sentry SDK. manifestPlaceholders["glitchtipDsn"] = localProperty("glitchtip.dsn") ?: "" } packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } } buildTypes { getByName("release") { isMinifyEnabled = true isShrinkResources = true } } compileOptions { sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 } } /** Reads a key from the root local.properties, or null when the file or key is absent. */ fun localProperty(key: String): String? { val file = rootProject.file("local.properties") if (!file.exists()) return null return Properties() .apply { file.inputStream().use { load(it) } } .getProperty(key) }