From c355df49c04a81bf05f85ebeb71b148e6dfd8c44 Mon Sep 17 00:00:00 2001 From: Jigar Brahmbhatt Date: Tue, 26 Mar 2024 16:24:44 -0400 Subject: [PATCH] Replace Crashlytics with Sentry Multiplatform --- android/build.gradle.kts | 2 - .../co/touchlab/droidcon/android/MainApp.kt | 2 - build.gradle.kts | 1 - gradle/libs.versions.toml | 6 +-- .../Droidcon.xcodeproj/project.pbxproj | 26 +++++----- ios/Droidcon/Droidcon/AppDelegate.swift | 1 - ios/Droidcon/Podfile | 2 +- ios/Droidcon/Podfile.lock | 51 +++++-------------- shared-ui/build.gradle.kts | 1 - shared/build.gradle.kts | 2 +- .../co/touchlab/droidcon/Koin.android.kt | 8 ++- .../kotlin/co/touchlab/droidcon/Koin.kt | 6 +++ .../kotlin/co/touchlab/droidcon/Koin.ios.kt | 2 + .../co/touchlab/droidcon/util/AppInit.kt | 15 ------ 14 files changed, 39 insertions(+), 86 deletions(-) delete mode 100644 shared/src/iosMain/kotlin/co/touchlab/droidcon/util/AppInit.kt diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 1d7011af..e11ed625 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -4,7 +4,6 @@ plugins { id("com.android.application") kotlin("android") alias(libs.plugins.googleServices) - alias(libs.plugins.crashlytics) } val releaseEnabled = file("./release.jks").exists() @@ -87,7 +86,6 @@ dependencies { implementation(libs.accompanist.navigationAnimation) implementation(platform(libs.firebase.bom)) implementation(libs.firebase.analytics) - implementation(libs.firebase.crashlytics) implementation(libs.hyperdrive.multiplatformx.api) diff --git a/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt b/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt index b96e87dc..1ba4cbea 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/MainApp.kt @@ -16,12 +16,10 @@ import co.touchlab.droidcon.ui.uiModule import co.touchlab.droidcon.util.ClasspathResourceReader import com.google.firebase.analytics.ktx.analytics import com.google.firebase.ktx.Firebase -import com.russhwolf.settings.ExperimentalSettingsApi import com.russhwolf.settings.ObservableSettings import com.russhwolf.settings.SharedPreferencesSettings import org.koin.dsl.module -@OptIn(ExperimentalSettingsApi::class) class MainApp : Application() { override fun onCreate() { diff --git a/build.gradle.kts b/build.gradle.kts index 8219912f..8df097a7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - alias(libs.plugins.crashlytics).apply(false) alias(libs.plugins.googleServices).apply(false) alias(libs.plugins.kotlinMultiplatform).apply(false) alias(libs.plugins.androidLibrary).apply(false) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ddd380e1..7dbaee22 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -21,7 +21,6 @@ hyperdrive = "0.1.148" multiplatformSettings = "1.1.1" sqlDelight = "2.0.1" firebase-bom = "32.7.4" -firebase-crashlytics-gradle = "2.9.9" gms-google-services = "4.4.1" compose-androidx-ui = "1.6.3" @@ -56,7 +55,6 @@ androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", versi accompanist-navigationAnimation = { module = "com.google.accompanist:accompanist-navigation-animation", version.ref = "accompanistNavigationAnimation" } firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebase-bom" } firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx", version = "_" } -firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx", version = "_" } hyperdrive-multiplatformx-api = { module = "org.brightify.hyperdrive:multiplatformx-api", version.ref = "hyperdrive" } android-desugar = { module = "com.android.tools:desugar_jdk_libs", version.ref = "android-desugaring" } uuid = { module = "com.benasher44:uuid", version.ref = "uuid" } @@ -71,6 +69,8 @@ kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutine kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" } +sentry = { module = "io.sentry:sentry-kotlin-multiplatform", version = "0.5.0" } + ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } ktor-client-ios = { module = "io.ktor:ktor-client-ios", version.ref = "ktor" } ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } @@ -88,7 +88,6 @@ sqldelight-runtime = { module = "app.cash.sqldelight:runtime", version.ref = "sq kermit = { module = "co.touchlab:kermit", version.ref = "kermit" } kermit-simple = { module = "co.touchlab:kermit-simple", version.ref = "kermit" } -kermit-crashlytics = { module = "co.touchlab:kermit-crashlytics", version.ref = "kermit" } stately-common = { module = "co.touchlab:stately-common", version.ref = "stately" } # Sample - Android @@ -109,7 +108,6 @@ koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } koin-test = { module = "io.insert-koin:koin-test", version.ref = "koin" } [plugins] -crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics-gradle" } googleServices = { id = "com.google.gms.google-services", version.ref = "gms-google-services" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } androidLibrary = { id = "com.android.library", version.ref = "android-gradle-plugin" } diff --git a/ios/Droidcon/Droidcon.xcodeproj/project.pbxproj b/ios/Droidcon/Droidcon.xcodeproj/project.pbxproj index 84cb4b44..b56d8464 100644 --- a/ios/Droidcon/Droidcon.xcodeproj/project.pbxproj +++ b/ios/Droidcon/Droidcon.xcodeproj/project.pbxproj @@ -286,8 +286,8 @@ F1465EF923AA94BF0055F7C3 /* Sources */, F1465EFA23AA94BF0055F7C3 /* Frameworks */, F1465EFB23AA94BF0055F7C3 /* Resources */, - A33EA3A8289D4DFD008850F7 /* Crashlytics Script */, D1B96CC21A1B9CA2AD709245 /* [CP] Embed Pods Frameworks */, + 0134B0E72BB23D3000CFA19F /* ShellScript */, ); buildRules = ( ); @@ -369,7 +369,7 @@ shellPath = /bin/sh; shellScript = "cd \"$SRCROOT/../..\"\n./gradlew :ios:embedAndSignAppleFrameworkForXcode \n"; }; - A08E871D529FE29D7BFB8889 /* [CP] Check Pods Manifest.lock */ = { + 0134B0E72BB23D3000CFA19F /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -377,21 +377,17 @@ inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", + "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}", ); - name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Droidcon-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "if which sentry-cli >/dev/null; then\nexport SENTRY_ORG={SENTRY_ORG}\nexport SENTRY_PROJECT={SENTRY_PROJECT}\nexport SENTRY_AUTH_TOKEN={SENTRY_AUTH_TOKEN}\nERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" --force-foreground 2>&1 >/dev/null)\nif [ ! $? -eq 0 ]; then\necho \"error: sentry-cli - $ERROR\"\nfi\nelse\necho \"error: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n"; }; - A33EA3A8289D4DFD008850F7 /* Crashlytics Script */ = { + A08E871D529FE29D7BFB8889 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -399,17 +395,19 @@ inputFileListPaths = ( ); inputPaths = ( - "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}", - "$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "Crashlytics Script"; + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Droidcon-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${PODS_ROOT}/FirebaseCrashlytics/run\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; D1B96CC21A1B9CA2AD709245 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; @@ -528,7 +526,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Apple Development: brady.aiello@gmail.com (94U525PPDD)"; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = 6A5MWU525T; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; diff --git a/ios/Droidcon/Droidcon/AppDelegate.swift b/ios/Droidcon/Droidcon/AppDelegate.swift index fcffdb5b..e9f831b3 100644 --- a/ios/Droidcon/Droidcon/AppDelegate.swift +++ b/ios/Droidcon/Droidcon/AppDelegate.swift @@ -13,7 +13,6 @@ class AppDelegate: NSObject, UIApplicationDelegate { didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { FirebaseApp.configure() - AppInitKt.setupKermit() startKoin() diff --git a/ios/Droidcon/Podfile b/ios/Droidcon/Podfile index 08d08586..ac7b6861 100644 --- a/ios/Droidcon/Podfile +++ b/ios/Droidcon/Podfile @@ -6,6 +6,6 @@ install! 'cocoapods', :deterministic_uuids => false target 'Droidcon' do pod 'Kingfisher', '~> 7.8.1' + pod 'Sentry', '~> 8.20.0' pod 'Firebase/Analytics' - pod 'Firebase/Crashlytics' end diff --git a/ios/Droidcon/Podfile.lock b/ios/Droidcon/Podfile.lock index 7f8b0e27..31a1dcdd 100644 --- a/ios/Droidcon/Podfile.lock +++ b/ios/Droidcon/Podfile.lock @@ -6,9 +6,6 @@ PODS: - FirebaseAnalytics (~> 10.15.0) - Firebase/CoreOnly (10.15.0): - FirebaseCore (= 10.15.0) - - Firebase/Crashlytics (10.15.0): - - Firebase/CoreOnly - - FirebaseCrashlytics (~> 10.15.0) - FirebaseAnalytics (10.15.0): - FirebaseAnalytics/AdIdSupport (= 10.15.0) - FirebaseCore (~> 10.0) @@ -31,31 +28,13 @@ PODS: - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Logger (~> 7.8) - - FirebaseCoreExtension (10.19.0): - - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.19.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.15.0): - - FirebaseCore (~> 10.5) - - FirebaseInstallations (~> 10.0) - - FirebaseSessions (~> 10.5) - - GoogleDataTransport (~> 9.2) - - GoogleUtilities/Environment (~> 7.8) - - nanopb (< 2.30910.0, >= 2.30908.0) - - PromisesObjC (~> 2.1) - FirebaseInstallations (10.15.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebaseSessions (10.19.0): - - FirebaseCore (~> 10.5) - - FirebaseCoreExtension (~> 10.0) - - FirebaseInstallations (~> 10.0) - - GoogleDataTransport (~> 9.2) - - GoogleUtilities/Environment (~> 7.10) - - nanopb (< 2.30910.0, >= 2.30908.0) - - PromisesSwift (~> 2.1) - GoogleAppMeasurement (10.15.0): - GoogleAppMeasurement/AdIdSupport (= 10.15.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) @@ -76,10 +55,6 @@ PODS: - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleDataTransport (9.2.5): - - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30910.0, >= 2.30908.0) - - PromisesObjC (< 3.0, >= 1.2) - GoogleUtilities/AppDelegateSwizzler (7.11.5): - GoogleUtilities/Environment - GoogleUtilities/Logger @@ -106,49 +81,47 @@ PODS: - nanopb/decode (2.30909.0) - nanopb/encode (2.30909.0) - PromisesObjC (2.3.1) - - PromisesSwift (2.3.1): - - PromisesObjC (= 2.3.1) + - Sentry (8.20.0): + - Sentry/Core (= 8.20.0) + - SentryPrivate (= 8.20.0) + - Sentry/Core (8.20.0): + - SentryPrivate (= 8.20.0) + - SentryPrivate (8.20.0) DEPENDENCIES: - Firebase/Analytics - - Firebase/Crashlytics - Kingfisher (~> 7.8.1) + - Sentry (~> 8.20.0) SPEC REPOS: trunk: - Firebase - FirebaseAnalytics - FirebaseCore - - FirebaseCoreExtension - FirebaseCoreInternal - - FirebaseCrashlytics - FirebaseInstallations - - FirebaseSessions - GoogleAppMeasurement - - GoogleDataTransport - GoogleUtilities - Kingfisher - nanopb - PromisesObjC - - PromisesSwift + - Sentry + - SentryPrivate SPEC CHECKSUMS: Firebase: 66043bd4579e5b73811f96829c694c7af8d67435 FirebaseAnalytics: 47cef43728f81a839cf1306576bdd77ffa2eac7e FirebaseCore: 2cec518b43635f96afe7ac3a9c513e47558abd2e - FirebaseCoreExtension: c08d14c7b22e07994e876d837e6f58642f340087 FirebaseCoreInternal: b444828ea7cfd594fca83046b95db98a2be4f290 - FirebaseCrashlytics: a83f26fb922a3fe181eb738fb4dcf0c92bba6455 FirebaseInstallations: cae95cab0f965ce05b805189de1d4c70b11c76fb - FirebaseSessions: e5f4caa188dc8bc6142abc974355be75b042215e GoogleAppMeasurement: 722db6550d1e6d552b08398b69a975ac61039338 - GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 Kingfisher: 63f677311d36a3473f6b978584f8a3845d023dc5 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 - PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265 + Sentry: a8d7b373b9f9868442b02a0c425192f693103cbf + SentryPrivate: 006b24af16828441f70e2ab6adf241bd0a8ad130 -PODFILE CHECKSUM: 4654f3ccb4ae86c4f9440935f0df48a0ebdaaeb8 +PODFILE CHECKSUM: 93eb4b2b1c30be7ff2afd9f4127e820ca4f2f507 COCOAPODS: 1.14.3 diff --git a/shared-ui/build.gradle.kts b/shared-ui/build.gradle.kts index d203ad90..910aa735 100644 --- a/shared-ui/build.gradle.kts +++ b/shared-ui/build.gradle.kts @@ -73,7 +73,6 @@ kotlin { implementation(project(":shared")) api(libs.kermit) - api(libs.kermit.crashlytics) api(libs.kotlinx.coroutines.core) api(libs.kotlinx.datetime) api(libs.multiplatformSettings.core) diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 147771f8..a26f45fb 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -67,7 +67,6 @@ kotlin { sourceSets { commonMain.dependencies { api(libs.kermit) - api(libs.kermit.crashlytics) api(libs.kotlinx.coroutines.core) api(libs.kotlinx.datetime) api(libs.multiplatformSettings.core) @@ -79,6 +78,7 @@ kotlin { implementation(libs.stately.common) implementation(libs.koin.core) implementation(libs.korio) + implementation(libs.sentry) } androidMain.dependencies { implementation(libs.sqldelight.driver.android) diff --git a/shared/src/androidMain/kotlin/co/touchlab/droidcon/Koin.android.kt b/shared/src/androidMain/kotlin/co/touchlab/droidcon/Koin.android.kt index 2fffd36c..2236761d 100644 --- a/shared/src/androidMain/kotlin/co/touchlab/droidcon/Koin.android.kt +++ b/shared/src/androidMain/kotlin/co/touchlab/droidcon/Koin.android.kt @@ -6,18 +6,14 @@ import co.touchlab.droidcon.domain.repository.impl.SqlDelightDriverFactory import co.touchlab.droidcon.service.AndroidNotificationService import co.touchlab.droidcon.util.formatter.AndroidDateFormatter import co.touchlab.droidcon.util.formatter.DateFormatter -import co.touchlab.kermit.ExperimentalKermitApi import co.touchlab.kermit.LogcatWriter import co.touchlab.kermit.Logger import co.touchlab.kermit.StaticConfig -import co.touchlab.kermit.crashlytics.CrashlyticsLogWriter -import com.russhwolf.settings.ExperimentalSettingsApi import io.ktor.client.engine.HttpClientEngine import io.ktor.client.engine.okhttp.OkHttp import org.koin.core.module.Module import org.koin.dsl.module -@OptIn(ExperimentalSettingsApi::class, ExperimentalKermitApi::class) actual val platformModule: Module = module { single { SqlDelightDriverFactory(context = get()).createDriver() @@ -41,6 +37,8 @@ actual val platformModule: Module = module { AndroidDateFormatter(dateTimeService = get()) } - val baseKermit = Logger(config = StaticConfig(logWriterList = listOf(LogcatWriter(), CrashlyticsLogWriter())), tag = "Droidcon") + val baseKermit = Logger(config = StaticConfig(logWriterList = listOf(LogcatWriter())), tag = "Droidcon") factory { (tag: String?) -> if (tag != null) baseKermit.withTag(tag) else baseKermit } } + +actual val sentryDsn = "https://6a97c8a17bd4ce7adc4a93d0bd3cb300@o4506955696766976.ingest.us.sentry.io/4506956255854592" diff --git a/shared/src/commonMain/kotlin/co/touchlab/droidcon/Koin.kt b/shared/src/commonMain/kotlin/co/touchlab/droidcon/Koin.kt index eda6e3b0..b3229d2c 100644 --- a/shared/src/commonMain/kotlin/co/touchlab/droidcon/Koin.kt +++ b/shared/src/commonMain/kotlin/co/touchlab/droidcon/Koin.kt @@ -44,6 +44,7 @@ import co.touchlab.droidcon.domain.service.impl.json.AboutJsonResourceDataSource import co.touchlab.droidcon.domain.service.impl.json.JsonResourceReader import co.touchlab.droidcon.domain.service.impl.json.JsonSeedResourceDataSource import io.ktor.client.HttpClient +import io.sentry.kotlin.multiplatform.Sentry import kotlinx.datetime.Clock import kotlinx.serialization.json.Json import org.koin.core.KoinApplication @@ -54,7 +55,12 @@ import org.koin.core.qualifier.qualifier import org.koin.core.scope.Scope import org.koin.dsl.module +expect val sentryDsn: String + fun initKoin(additionalModules: List): KoinApplication { + Sentry.init { + it.dsn = sentryDsn + } val koinApplication = startKoin { modules( additionalModules + diff --git a/shared/src/iosMain/kotlin/co/touchlab/droidcon/Koin.ios.kt b/shared/src/iosMain/kotlin/co/touchlab/droidcon/Koin.ios.kt index 196f699e..d7766d29 100644 --- a/shared/src/iosMain/kotlin/co/touchlab/droidcon/Koin.ios.kt +++ b/shared/src/iosMain/kotlin/co/touchlab/droidcon/Koin.ios.kt @@ -68,3 +68,5 @@ fun Koin.get(objCProtocol: ObjCProtocol, qualifier: Qualifier?): Any { val kClazz = requireNotNull(getOriginalKotlinClass(objCProtocol)) { "Could not get original kotlin class for $objCProtocol." } return get(kClazz, qualifier, null) } + +actual val sentryDsn = "https://5678e5aebe72952167c6fb89bbad02e3@o4506955696766976.ingest.us.sentry.io/4506973278961664" diff --git a/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/AppInit.kt b/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/AppInit.kt deleted file mode 100644 index 677fa2cf..00000000 --- a/shared/src/iosMain/kotlin/co/touchlab/droidcon/util/AppInit.kt +++ /dev/null @@ -1,15 +0,0 @@ -package co.touchlab.droidcon.util - -import co.touchlab.crashkios.crashlytics.enableCrashlytics -import co.touchlab.crashkios.crashlytics.setCrashlyticsUnhandledExceptionHook -import co.touchlab.kermit.ExperimentalKermitApi -import co.touchlab.kermit.Logger -import co.touchlab.kermit.Severity -import co.touchlab.kermit.crashlytics.CrashlyticsLogWriter - -@OptIn(ExperimentalKermitApi::class) -fun setupKermit() { - Logger.addLogWriter(CrashlyticsLogWriter(minSeverity = Severity.Info, minCrashSeverity = Severity.Warn)) - enableCrashlytics() - setCrashlyticsUnhandledExceptionHook() -}