summaryrefslogtreecommitdiff
path: root/app/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'app/build.gradle')
-rw-r--r--app/build.gradle19
1 files changed, 17 insertions, 2 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 17688ab..e6d0c2a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -21,6 +21,21 @@ plugins {
id 'kotlin-kapt'
}
+def getSentryDsn = { ->
+
+ def sentryDsnEnv = System.getenv("SENTRY_DSN")
+ if (sentryDsnEnv != null) {
+ return sentryDsnEnv
+ }
+
+ Properties properties = new Properties()
+ def propertiesFile = project.rootProject.file('local.properties')
+ if (propertiesFile.exists()) {
+ properties.load(propertiesFile.newDataInputStream())
+ }
+ return properties.getProperty('SENTRY_DSN')
+}
+
android {
compileSdkVersion buildConfig.compileSdk
@@ -39,7 +54,7 @@ android {
]
resValue("string", "mapbox_key", MAPBOX_KEY)
- buildConfigField("String", "SENTRY_DSN", "\"$SENTRY_DSN\"")
+ buildConfigField("String", "SENTRY_DSN", "\"${getSentryDsn()}\"")
}
signingConfigs {
@@ -150,7 +165,7 @@ dependencies {
Libs.Retrofit.retrofit,
Libs.Retrofit.scalars,
- Libs.MapBox.sdk,
+ Libs.maplibre,
Libs.mpAndroidCharts,
Libs.telemetry,