Commit 19bfd047 authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Moved sentry DSN to variables

parent 49d2b16f
......@@ -31,6 +31,7 @@ android {
buildConfigField("Boolean", "FROM_CI", String.valueOf(getSystemVariableOrDefault("CI_COMMIT_SHORT_SHA", "") != ""))
buildConfigField("String", "COMMIT_HASH", '"' + getGitCommitHash() + '"')
buildConfigField("String", "SENTRY_DSN", '"' + getSystemVariableOrDefault("SENTRY_DSN", "dummy") + '"')
kapt {
arguments {
......
......@@ -95,7 +95,7 @@ class SmokeScreen : Application() {
}
fun initSentry(forceStatus: Status = Status.NONE) {
if (!BuildConfig.DEBUG) {
if (!BuildConfig.DEBUG && BuildConfig.SENTRY_DSN != "dummy") {
val enabledType = getPreferences().crashreportingType
if (forceStatus != Status.DATASAVING && (enabledType == Crashreporting.FULL || forceStatus == Status.ENABLED)) {
// Enable Sentry in full mode
......@@ -103,7 +103,7 @@ class SmokeScreen : Application() {
// Info: Some data is attached by the AndroidEventBuilderHelper class, which is present by default
GlobalScope.launch(Dispatchers.IO) {
Sentry.init(
"https://fadeddb58abf408db50809922bf064cc@sentry.frostnerd.com:443/2",
BuildConfig.SENTRY_DSN,
AndroidSentryClientFactory(this@SmokeScreen)
)
Sentry.getContext().user =
......@@ -135,7 +135,7 @@ class SmokeScreen : Application() {
// Only crashes will be reported, no regular events.
GlobalScope.launch(Dispatchers.IO) {
Sentry.init(
"https://fadeddb58abf408db50809922bf064cc@sentry.frostnerd.com:443/2",
BuildConfig.SENTRY_DSN,
AndroidSentryClientFactory(this@SmokeScreen)
)
Sentry.getContext().user = User("anon-" + BuildConfig.VERSION_CODE, null, null, null)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment