From 691994b7767fb2b4859f7e8c8ca67166259a034e Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 28 Jun 2020 00:42:50 -0700 Subject: Update gradle and add bugsnag to sample app --- sample/build.gradle | 5 ++++- sample/src/main/AndroidManifest.xml | 3 +++ .../src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt | 16 +++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) (limited to 'sample') diff --git a/sample/build.gradle b/sample/build.gradle index d620c2a..fd07da1 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -4,6 +4,7 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' +//apply plugin: 'com.bugsnag.android.gradle' apply plugin: 'com.github.triplet.play' apply plugin: 'dagger.hilt.android.plugin' @@ -64,6 +65,7 @@ android { versionNameSuffix "-debug" signingConfig signingConfigs.debug resValue "string", "app_name", "KAU Debug" + ext.enableBugsnag = false } release { @@ -130,6 +132,8 @@ dependencies { implementation Dependencies.hilt kapt Dependencies.hiltCompiler + implementation Dependencies.bugsnag + implementation Dependencies.materialDialog("input") testImplementation Dependencies.kotlinTest @@ -137,7 +141,6 @@ dependencies { testImplementation Dependencies.hiltTest kaptTest Dependencies.hiltCompiler - androidTestImplementation Dependencies.kotlinTest androidTestImplementation Dependencies.espresso androidTestImplementation Dependencies.espresso("intents") diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 5846c6b..b205c51 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -57,6 +57,9 @@ android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/kau_file_paths" /> + \ No newline at end of file diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt index 282f9ff..bead882 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt @@ -16,10 +16,24 @@ package ca.allanwang.kau.sample import android.app.Application +import com.bugsnag.android.Bugsnag +import com.bugsnag.android.Configuration import dagger.hilt.android.HiltAndroidApp /** * Created by Allan Wang on 2017-06-08. */ @HiltAndroidApp -class SampleApp : Application() +class SampleApp : Application() { + override fun onCreate() { + super.onCreate() +// initBugsnag() + } + + private fun initBugsnag() { + if (BuildConfig.DEBUG) { + return + } + Bugsnag.start(this) + } +} -- cgit v1.2.3