Skip to content

Commit 24f01a0

Browse files
authored
Use plain text values for Sentry + env-injected token (#1850)
2 parents 47a90ce + a816342 commit 24f01a0

5 files changed

Lines changed: 14 additions & 9 deletions

File tree

.configure

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
"destination": "Simplenote/gradle.properties",
99
"encrypt": true
1010
},
11-
{
12-
"file": "android/simplenote/sentry.properties",
13-
"destination": "sentry.properties",
14-
"encrypt": true
15-
},
1611
{
1712
"file": "android/automattic.jks",
1813
"destination": ".configure-files/release.jks",
@@ -32,4 +27,4 @@
3227
"file_dependencies": [
3328

3429
]
35-
}
30+
}

.configure-files/sentry.properties.enc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Simplenote/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ android {
4242

4343
minSdkVersion 23
4444
targetSdkVersion 35
45+
46+
buildConfigField "String", "SENTRY_DSN", "\"https://89e443ca3fd84e588d1809cfbfcc40f4@sentry.io/1455558\""
4547
}
4648

4749

@@ -69,6 +71,13 @@ android {
6971
}
7072
}
7173

74+
sentry {
75+
org = "a8c"
76+
projectName = "simplenote-android"
77+
authToken = providers.environmentVariable("SENTRY_AUTH_TOKEN").orNull
78+
autoInstallation.enabled = false
79+
}
80+
7281
buildscript {
7382
dependencies {
7483
classpath "io.sentry:sentry-android-gradle-plugin:$sentryVersion"
@@ -219,7 +228,6 @@ android.applicationVariants.all { variant ->
219228
key == "GOOGLE_ANALYTICS_ID" ||
220229
key == "LOGIN_EMAIL" ||
221230
key == "LOGIN_PASSWORD" ||
222-
key == "SENTRY_DSN" ||
223231
key == "WPCOM_CLIENT_ID" ||
224232
key == "SCREENSHOT_EMAIL" ||
225233
key == "SCREENSHOT_PASSWORD") {

Simplenote/gradle.properties-example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ crashlyticsApiKey = 0
22
googleAnalyticsId =
33
loginEmail =
44
loginPassword =
5-
sentryDsn=https://00000000000000000000000000000000@sentry.io/00000000
65
simperiumAppId = history-analyst-dad
76
simperiumAppKey = dccacc59bbef4982a15abaeafaf7bc8a
87
wpcomClientId =

Simplenote/src/main/java/com/automattic/simplenote/utils/crashlogging/SimplenoteCrashLoggingDataProvider.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class SimplenoteCrashLoggingDataProvider @Inject constructor(
4545
get() = PerformanceMonitoringConfig.Disabled
4646

4747
override fun crashLoggingEnabled(): Boolean {
48+
if (BuildConfig.DEBUG) {
49+
return false
50+
}
51+
4852
return Simplenote.analyticsIsEnabled()
4953
}
5054

0 commit comments

Comments
 (0)