diff --git a/app/build.gradle b/app/build.gradle index f5ebe35..096c08f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' diff --git a/app/src/main/java/com/github/kr328/clash/MainApplication.kt b/app/src/main/java/com/github/kr328/clash/MainApplication.kt index 0736332..7f2f7b6 100644 --- a/app/src/main/java/com/github/kr328/clash/MainApplication.kt +++ b/app/src/main/java/com/github/kr328/clash/MainApplication.kt @@ -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. + } + + } } } \ No newline at end of file