Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c030d8ca authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Update crashlytics

parent fe1967a8
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ buildscript {
    ext.abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2]

    repositories {
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://maven.google.com' }
        jcenter()
        google()
@@ -43,9 +42,9 @@ buildscript {

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'io.fabric.tools:gradle:1.29.0'
        classpath "io.realm:realm-gradle-plugin:$realm_version"
    }
}
@@ -55,7 +54,6 @@ allprojects {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://maven.google.com' }
        maven {
            name 'glide-snapshot'
+2 −3
Original line number Diff line number Diff line
@@ -186,8 +186,7 @@ dependencies {
    implementation project(':data')
    implementation project(':domain')

    withAnalyticsImplementation 'com.google.firebase:firebase-core:16.0.9'
    withAnalyticsImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    withAnalyticsImplementation 'com.google.firebase:firebase-crashlytics:17.3.0'

    noAnalyticsDebug project(path: ':data', configuration: 'noAnalyticsDebug')
    noAnalyticsRelease project(path: ':data', configuration: 'noAnalyticsRelease')
@@ -196,6 +195,6 @@ dependencies {
}

if (getGradle().getStartParameter().getTaskRequests().toString().contains("WithAnalytics")) {
    apply plugin: 'io.fabric'
    apply plugin: 'com.google.gms.google-services'
    apply plugin: 'com.google.firebase.crashlytics'
}
+13 −3
Original line number Diff line number Diff line
@@ -18,15 +18,25 @@
 */
package com.moez.QKSMS.common.util

import com.crashlytics.android.Crashlytics
import android.util.Log
import com.google.firebase.crashlytics.FirebaseCrashlytics
import timber.log.Timber

class CrashlyticsTree : Timber.Tree() {

    override fun log(priority: Int, tag: String?, message: String?, throwable: Throwable?) {
        Crashlytics.log(message)
        val crashlytics = FirebaseCrashlytics.getInstance()
        val priorityString = when (priority) {
            Log.VERBOSE -> "V"
            Log.DEBUG -> "D"
            Log.INFO -> "I"
            Log.WARN -> "W"
            Log.ERROR -> "E"
            else -> "WTF"
        }

        throwable?.run(Crashlytics::logException)
        crashlytics.log("$priorityString/$tag: $message")
        throwable?.run(crashlytics::recordException)
    }

}