1
0
Fork 0
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:
Allan Quatermain 2023-03-16 19:19:24 +03:00 committed by GitHub
parent 4cae9fce35
commit 5ee6443ebb
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 140 additions and 7 deletions

View 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')
}

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.anytypeio.anytype.crash_reporting"/>

View file

@ -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
}
}
}