Merge fc2bce4541 into 10efd73965
This commit is contained in:
commit
af27ffc23a
|
|
@ -1,5 +1,7 @@
|
|||
import com.mikepenz.aboutlibraries.plugin.StrictMode
|
||||
import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel
|
||||
import io.sentry.android.gradle.SentryPlugin
|
||||
import io.sentry.android.gradle.extensions.SentryPluginExtension
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
|
|
@ -11,13 +13,18 @@ plugins {
|
|||
alias(libs.plugins.aboutlibraries)
|
||||
alias(libs.plugins.hilt)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.sentry.android)
|
||||
alias(libs.plugins.sentry.android) apply false
|
||||
alias(libs.plugins.sqldelight)
|
||||
alias(libs.plugins.google.services)
|
||||
id("kotlin-kapt")
|
||||
id("kotlin-parcelize")
|
||||
}
|
||||
|
||||
val sentryEnabled = buildproperty("sentry.dsn", "RVX_SENTRY_DSN") != "";
|
||||
if(sentryEnabled) {
|
||||
apply<SentryPlugin>();
|
||||
}
|
||||
|
||||
fun property(fileName: String, propertyName: String, fallbackEnv: String? = null): String? {
|
||||
val propsFile = rootProject.file(fileName)
|
||||
if (propsFile.exists()) {
|
||||
|
|
@ -156,16 +163,18 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
sentry {
|
||||
autoUploadProguardMapping =
|
||||
buildproperty("sentry.upload_mappings", "RVX_SENTRY_UPLOAD_MAPPINGS") == "true"
|
||||
if(sentryEnabled) {
|
||||
configure<SentryPluginExtension> {
|
||||
autoUploadProguardMapping =
|
||||
buildproperty("sentry.upload_mappings", "RVX_SENTRY_UPLOAD_MAPPINGS") == "true"
|
||||
|
||||
tracingInstrumentation {
|
||||
enabled = true
|
||||
|
||||
logcat {
|
||||
tracingInstrumentation {
|
||||
enabled = true
|
||||
minLevel = LogcatLevel.WARNING
|
||||
|
||||
logcat {
|
||||
enabled = true
|
||||
minLevel = LogcatLevel.WARNING
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,9 +351,11 @@ class MainActivity : AppCompatActivity() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
SentryAndroid.init(this) { options ->
|
||||
options.dsn = BuildConfig.SENTRY_DSN
|
||||
options.release = BuildConfig.VERSION_NAME
|
||||
if(BuildConfig.SENTRY_DSN != "") {
|
||||
SentryAndroid.init(this) { options ->
|
||||
options.dsn = BuildConfig.SENTRY_DSN
|
||||
options.release = BuildConfig.VERSION_NAME
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION") // We are fixing a bug in the splash screen
|
||||
|
|
|
|||
Loading…
Reference in New Issue