Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Charles
Nebulo
Commits
19bfd047
Commit
19bfd047
authored
Nov 28, 2019
by
Daniel Wolf
Browse files
Moved sentry DSN to variables
parent
49d2b16f
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/build.gradle
View file @
19bfd047
...
...
@@ -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
{
...
...
app/src/main/java/com/frostnerd/smokescreen/SmokeScreen.kt
View file @
19bfd047
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment