From fb47021cff6d164a64c97f10c4de8a46e8a7584c Mon Sep 17 00:00:00 2001 From: William Brawner Date: Thu, 24 Nov 2022 21:40:01 -0700 Subject: [PATCH] Add firebase analytics and crashlytics --- app/build.gradle.kts | 5 +++++ build.gradle.kts | 2 ++ gradle.properties | 5 +++-- gradle/libs.versions.toml | 3 +++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a84f5e6..d2891a7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -3,6 +3,8 @@ plugins { id("kotlin-android") id("kotlin-kapt") id("dagger.hilt.android.plugin") + id("com.google.gms.google-services") + id("com.google.firebase.crashlytics") } android { @@ -62,6 +64,9 @@ dependencies { implementation(libs.accompanist.webview) implementation(libs.bundles.compose) implementation(libs.lifecycle) + implementation(platform(libs.firebase.bom)) + implementation(libs.firebase.analytics) + implementation(libs.firebase.crashlytics) implementation(libs.hilt.android.core) kapt(libs.hilt.android.kapt) implementation(libs.hilt.navigation.compose) diff --git a/build.gradle.kts b/build.gradle.kts index 66f229a..e2aedae 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,6 +10,8 @@ buildscript { classpath("com.android.tools.build:gradle:7.3.0") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}") classpath("com.google.dagger:hilt-android-gradle-plugin:$hiltVersion") + classpath("com.google.gms:google-services:4.3.14") + classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.2") } } diff --git a/gradle.properties b/gradle.properties index 98bed16..99306b7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,6 +16,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true +android.enableJetifier=false # Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official +org.gradle.unsafe.configuration-cache=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 815151a..365bcce 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -38,6 +38,9 @@ compose-test = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "c navigation-compose = { module = "androidx.navigation:navigation-compose", version = "2.5.2" } coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } +firebase-bom = { module = "com.google.firebase:firebase-bom", version = "31.1.0" } +firebase-analytics = { module = "com.google.firebase:firebase-analytics-ktx" } +firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx" } preference = { module = "androidx.preference:preference-ktx", version = "1.2.0" } lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.5.1" } hilt-android-core = { module = "com.google.dagger:hilt-android", version.ref = "hilt-android" }