Add Sentry build tags (#3765)

This commit is contained in:
Adrian Cojocaru
2025-08-27 23:18:41 +03:00
committed by GitHub
parent afd95b5766
commit 426e519665
4 changed files with 39 additions and 6 deletions

View File

@@ -27,10 +27,12 @@ android {
minSdk = 21
targetSdk = 33
versionCode = 14
versionName = "6.0.1"
testInstrumentationRunner = "org.maplibre.android.InstrumentationRunner"
multiDexEnabled = true
versionName = file("../VERSION").readText().trim()
manifestPlaceholders["SENTRY_DSN"] = ""
manifestPlaceholders["SENTRY_ENV"] = ""
}
nativeBuild(listOf("example-custom-layer"))
@@ -53,9 +55,11 @@ android {
keepDebugSymbols += "**/*.so"
}
}
buildConfigField("String", "SENTRY_DSN", "\"" + (System.getenv("SENTRY_DSN") ?: "") + "\"")
manifestPlaceholders["SENTRY_DSN"] = System.getenv("SENTRY_DSN") ?: ""
}
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true

View File

@@ -1317,6 +1317,11 @@
android:value="${SENTRY_DSN}"
/>
<meta-data
android:name="io.sentry.environment"
android:value="${SENTRY_ENV}"
/>
<!-- Add data like request headers, user ip address and device name, see https://docs.sentry.io/platforms/android/data-management/data-collected/ for more info -->
<meta-data
android:name="io.sentry.send-default-pii"