aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-06-28 00:42:50 -0700
committerAllan Wang <me@allanwang.ca>2020-06-28 00:42:50 -0700
commit691994b7767fb2b4859f7e8c8ca67166259a034e (patch)
tree69817f5adccc4e6d8a0800240b992081ce211c24 /sample
parent813f3867839d015c123625eb0a4586e79e210200 (diff)
downloadkau-691994b7767fb2b4859f7e8c8ca67166259a034e.tar.gz
kau-691994b7767fb2b4859f7e8c8ca67166259a034e.tar.bz2
kau-691994b7767fb2b4859f7e8c8ca67166259a034e.zip
Update gradle and add bugsnag to sample app
Diffstat (limited to 'sample')
-rw-r--r--sample/build.gradle5
-rw-r--r--sample/src/main/AndroidManifest.xml3
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt16
3 files changed, 22 insertions, 2 deletions
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" />
</provider>
+ <meta-data
+ android:name="com.bugsnag.android.API_KEY"
+ android:value="0a09e498a253b98237500fb5f948e5c6"/>
</application>
</manifest> \ 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)
+ }
+}