diff --git a/app/build.gradle b/app/build.gradle index 40e186d0fa..57816bd244 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -210,6 +210,7 @@ dependencies { implementation libs.kizzyrpc implementation libs.conscrypt.android + implementation libs.sentry.android debugImplementation libs.leakcanary.android nightlyImplementation libs.leakcanary.android @@ -233,19 +234,21 @@ dependencies { kspAndroidTest libs.hilt.android.compiler } - sentry { - org = "appfuton" - projectName = "android" - - // this will upload your source code to Sentry to show it as part of the stack traces - // disable if you don't want to expose your sources - includeSourceContext = true - - // Skip all Sentry Gradle plugin tasks (source upload, mapping upload, etc.) - // if SENTRY_AUTH_TOKEN is not provided — avoids build errors in local/dev environments - def sentryAuthToken = System.getenv('SENTRY_AUTH_TOKEN') - includeSourceContext = sentryAuthToken != null && !sentryAuthToken.isEmpty() - autoUploadProguardMapping = sentryAuthToken != null && !sentryAuthToken.isEmpty() - autoUploadSourceContext = sentryAuthToken != null && !sentryAuthToken.isEmpty() + org = "appfuton" + projectName = "android" + authToken = System.getenv('SENTRY_AUTH_TOKEN') ?: '' + + // Disable all uploads + includeSourceContext = false + autoUploadProguardMapping = false + autoUploadSourceContext = false + + // Disable instrumentation that causes manifest/UUID changes + tracingInstrumentation { enabled = false } + autoInstallation { enabled = false } + + // Disable telemetry and dependency reporting that cause non-deterministic builds + includeDependenciesReport = false + telemetry = false } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b0a0d4ad01..ed404b1087 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -39,6 +39,7 @@ preference = "1.2.1" recyclerview = "1.4.0" room = "2.7.2" serialization = "1.9.0" +sentry = "8.36.0" ssiv = "v4.1" swiperefreshlayout = "1.1.0" testRules = "1.7.0" @@ -112,6 +113,7 @@ okhttp = { module = "com.squareup.okhttp3:okhttp" } okhttp-dnsoverhttps = { module = "com.squareup.okhttp3:okhttp-dnsoverhttps" } okhttp-tls = { module = "com.squareup.okhttp3:okhttp-tls" } okio = { module = "com.squareup.okio:okio", version.ref = "okio" } +sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentry" } ssiv = { module = "com.github.AppFuton:subsampling-scale-image-view", version.ref = "ssiv" } workinspector = { module = "com.github.Koitharu:WorkInspector", version.ref = "workinspector" } androidx-window = { module = "androidx.window:window", version.ref = "window" }