add crashlytics
This commit is contained in:
2 files changed
+27
-2
No files matched your search
+3
-2
@@ -3,6 +3,8 @@ apply plugin: 'kotlinx-serialization'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'io.fabric'
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
@@ -50,6 +52,5 @@ dependencies {
|
||||
implementation "com.charleskorn.kaml:kaml:0.14.0"
|
||||
implementation "com.google.android.material:material:1.2.0-alpha02"
|
||||
implementation 'com.google.firebase:firebase-analytics:17.2.1'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
@@ -2,6 +2,7 @@ package com.github.kr328.clash
|
||||
|
||||
import android.app.Application
|
||||
import android.content.Context
|
||||
import com.github.kr328.clash.core.Constants
|
||||
import com.github.kr328.clash.core.utils.Log
|
||||
import com.google.firebase.FirebaseApp
|
||||
|
||||
@@ -29,5 +30,28 @@ class MainApplication : Application() {
|
||||
} catch (e: IllegalStateException) {
|
||||
Log.i("Already registered")
|
||||
}
|
||||
|
||||
Log.handler = object: Log.LogHandler {
|
||||
override fun info(message: String, throwable: Throwable?) {
|
||||
android.util.Log.i(Constants.TAG, message, throwable)
|
||||
}
|
||||
|
||||
override fun warn(message: String, throwable: Throwable?) {
|
||||
|
||||
}
|
||||
|
||||
override fun error(message: String, throwable: Throwable?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun wtf(message: String, throwable: Throwable?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun debug(message: String, throwable: Throwable?) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user