diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts
index ad81c65..a4550b8 100644
--- a/androidApp/build.gradle.kts
+++ b/androidApp/build.gradle.kts
@@ -1,4 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+import java.util.Properties
plugins {
alias(libs.plugins.androidApplication)
@@ -50,6 +51,10 @@ android {
.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 {
@@ -67,3 +72,12 @@ android {
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)
+}
diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml
index e0da81a..5d94f36 100644
--- a/androidApp/src/main/AndroidManifest.xml
+++ b/androidApp/src/main/AndroidManifest.xml
@@ -21,7 +21,8 @@
-
+
+