mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-979 App | Tech | Setup sentry (#3002)
DROID-979 App | Tech | Setup sentry
This commit is contained in:
parent
4cae9fce35
commit
5ee6443ebb
19 changed files with 140 additions and 7 deletions
25
crash-reporting/build.gradle
Normal file
25
crash-reporting/build.gradle
Normal file
|
@ -0,0 +1,25 @@
|
|||
plugins {
|
||||
id "com.android.library"
|
||||
id "kotlin-android"
|
||||
id "io.sentry.android.gradle" version "3.4.2"
|
||||
}
|
||||
|
||||
android {
|
||||
sentry {
|
||||
includeProguardMapping = true
|
||||
autoUploadProguardMapping = true
|
||||
experimentalGuardsquareSupport = false
|
||||
uploadNativeSymbols = false
|
||||
includeNativeSources = false
|
||||
autoInstallation {
|
||||
enabled = true
|
||||
sentryVersion = libs.versions.sentryVersion
|
||||
}
|
||||
includeDependenciesReport = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.sentry
|
||||
implementation project(path: ':core-utils')
|
||||
}
|
2
crash-reporting/src/main/AndroidManifest.xml
Normal file
2
crash-reporting/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.anytypeio.anytype.crash_reporting"/>
|
|
@ -0,0 +1,20 @@
|
|||
package com.anytypeio.anytype
|
||||
|
||||
import android.content.Context
|
||||
import com.anytypeio.anytype.core_utils.tools.AppInfo
|
||||
import io.sentry.android.core.SentryAndroid
|
||||
import io.sentry.android.core.SentryAndroidOptions
|
||||
|
||||
class SentryCrashReporter(
|
||||
context: Context,
|
||||
appInfo: AppInfo
|
||||
) {
|
||||
|
||||
init {
|
||||
SentryAndroid.init(context) { options: SentryAndroidOptions ->
|
||||
options.release = appInfo.versionName
|
||||
options.environment = appInfo.sentryEnvironment.value
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue