feature: integrate Sentry SDK for crash reporting on Android and iOS

This commit is contained in:
Antoine Jaury
2026-09-30 11:18:54 +02:00
parent 87d4f3ce5d
commit 48a78e5743
14 changed files with 284 additions and 41 deletions
+2
View File
@@ -2,6 +2,8 @@ plugins {
id("gwenedeg.kmp.library")
id("gwenedeg.compose")
alias(libs.plugins.kotlinSerialization)
id("gwenedeg.secrets")
alias(libs.plugins.sentry)
}
kotlin {
@@ -0,0 +1,20 @@
package bzh.ajaury.chombev
import io.sentry.kotlin.multiplatform.Sentry
object SentryHelper {
fun initializeSentry() {
// The DSN is injected at build time from local.properties (or the GLITCHTIP_DSN
// environment variable) so it never lands in version control. Without it, crash
// reporting is simply disabled.
val dsn = BuildSecrets.GLITCHTIP_DSN
if (dsn.isBlank()) return
Sentry.init { options ->
options.dsn = dsn
options.debug = true
options.sendDefaultPii = false
options.enableAutoSessionTracking = false
}
}
}