Skip to content

Commit 47f05d6

Browse files
committed
Connect the app to Firebase Crashlytics and Performance
1 parent c47408d commit 47f05d6

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

app/build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ plugins {
33
id 'org.jetbrains.kotlin.android'
44
id 'org.jetbrains.kotlin.plugin.serialization'
55
id 'io.gitlab.arturbosch.detekt'
6+
id 'com.google.gms.google-services'
7+
id 'com.google.firebase.crashlytics'
8+
id 'com.google.firebase.firebase-perf'
69
}
710

811
android {
@@ -48,10 +51,13 @@ tasks.named("detekt").configure {
4851
dependencies {
4952
implementation 'androidx.core:core-ktx:1.7.0'
5053
implementation 'androidx.appcompat:appcompat:1.4.1'
51-
implementation 'com.google.android.material:material:1.7.0-alpha01'
54+
implementation 'com.google.android.material:material:1.7.0-alpha02'
5255
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
5356
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
5457
implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'
58+
implementation 'com.google.firebase:firebase-crashlytics-ktx:18.2.11'
59+
implementation 'com.google.firebase:firebase-analytics-ktx:21.0.0'
60+
implementation 'com.google.firebase:firebase-perf-ktx:20.1.0'
5561
testImplementation 'junit:junit:4.13.2'
5662
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
5763
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

app/google-services.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"project_info": {
3+
"project_number": "356711695787",
4+
"project_id": "polyhoot-598be",
5+
"storage_bucket": "polyhoot-598be.appspot.com"
6+
},
7+
"client": [
8+
{
9+
"client_info": {
10+
"mobilesdk_app_id": "1:356711695787:android:2c3b9dd0478f0ccdfbfeee",
11+
"android_client_info": {
12+
"package_name": "net.ciphen.polyhoot"
13+
}
14+
},
15+
"oauth_client": [
16+
{
17+
"client_id": "356711695787-rjakv852i14nqd79ujphffrl0e307ev6.apps.googleusercontent.com",
18+
"client_type": 3
19+
}
20+
],
21+
"api_key": [
22+
{
23+
"current_key": "AIzaSyAyHpQSt8L7YJThdP-sFaLXvPaJ33K6dvI"
24+
}
25+
],
26+
"services": {
27+
"appinvite_service": {
28+
"other_platform_oauth_client": [
29+
{
30+
"client_id": "356711695787-rjakv852i14nqd79ujphffrl0e307ev6.apps.googleusercontent.com",
31+
"client_type": 3
32+
}
33+
]
34+
}
35+
}
36+
}
37+
],
38+
"configuration_version": "1"
39+
}

app/src/main/java/net/ciphen/polyhoot/Polyhoot.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
package net.ciphen.polyhoot
1818

1919
import com.google.android.material.color.DynamicColors
20+
import com.google.firebase.FirebaseApp
2021

2122
class Polyhoot: android.app.Application() {
2223
override fun onCreate() {
2324
super.onCreate()
25+
FirebaseApp.initializeApp(this)
2426
DynamicColors.applyToActivitiesIfAvailable(this)
2527
}
2628
}

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
buildscript {
2+
dependencies {
3+
classpath 'com.android.tools.build:gradle:3.4.0'
4+
classpath 'com.google.gms:google-services:4.3.10'
5+
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.0'
6+
classpath 'com.google.firebase:perf-plugin:1.4.1'
7+
}
8+
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
29
plugins {
310
id 'com.android.application' version '7.4.0-alpha02' apply false
411
id 'com.android.library' version '7.4.0-alpha02' apply false

0 commit comments

Comments
 (0)