Skip to content

Commit 0d9296c

Browse files
authored
MOBILE-607: Crashlytics (#44)
1 parent 3439f68 commit 0d9296c

File tree

5 files changed

+26
-4
lines changed

5 files changed

+26
-4
lines changed

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Android CI
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ "main", "release/*" ]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: [ "main", "release/*" ]
88

99
jobs:
1010
build:

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
.cxx
99
local.properties
1010
.idea/
11-
.kotlin/
11+
.kotlin/
12+
google-services.json

app/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ plugins {
1717
alias(libs.plugins.arturbosch.detekt)
1818
}
1919

20+
val googleServicesFilename = "google-services.json"
21+
val googleServicesFile = file(googleServicesFilename)
22+
if (googleServicesFile.exists()) {
23+
plugins.apply(libs.plugins.google.services.get().pluginId)
24+
plugins.apply(libs.plugins.firebase.crashlytics.get().pluginId)
25+
}
26+
2027
android {
2128
namespace = "com.fingerprintjs.android.fpjs_pro_demo"
2229
compileSdk = 35
@@ -126,6 +133,10 @@ dependencies {
126133
implementation(libs.androidx.compose.material3)
127134
implementation(libs.androidx.compose.animation)
128135

136+
//Firebase
137+
implementation(platform(libs.firebase.bom))
138+
implementation(libs.firebase.crashlytics.ndk)
139+
129140
//shimmer
130141
implementation(libs.valentinilk.compose.shimmer)
131142

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ plugins {
55
alias(libs.plugins.jetbrains.kotlin.compose) apply false
66
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
77
alias(libs.plugins.jetbrains.kotlin.kapt) apply false
8+
alias(libs.plugins.google.services) apply false
9+
alias(libs.plugins.firebase.crashlytics) apply false
810
}

gradle/libs.versions.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[versions]
2+
firebaseBom = "33.15.0"
23
ktxCore = "1.13.1"
34
ktxLifecycleRuntime = "2.8.6"
45
composeNavigation = "2.8.3"
@@ -21,6 +22,8 @@ fingerprintDebug = "2.9.0-debug"
2122
androidApplicationPlugin = "8.7.1"
2223
kotlin = "2.0.21"
2324
detekt = "1.23.8"
25+
googleServicesPlugin = "4.4.3"
26+
firebaseCrashlytics = "3.0.5"
2427

2528
[libraries]
2629
androidx-naviation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "composeNavigation" }
@@ -38,6 +41,9 @@ androidx-compose-ui-preview = { group = "androidx.compose.ui", name = "ui-toolin
3841
androidx-compose-animation = { group = "androidx.compose.animation", name = "animation", version.ref = "composeAnimation" }
3942
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
4043
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
44+
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
45+
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
46+
firebase-crashlytics-ndk = { module = "com.google.firebase:firebase-crashlytics-ndk" }
4147
squareup-okHttp3 = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okHttp3" }
4248
valentinilk-compose-shimmer = { group = "com.valentinilk.shimmer", name = "compose-shimmer", version.ref = "composeShimmer" }
4349
michaelbull-kotlin-result = { group = "com.michael-bull.kotlin-result", name = "kotlin-result", version.ref = "kotlinResult" }
@@ -64,4 +70,6 @@ jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref =
6470
jetbrains-kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
6571
jetbrains-kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
6672
jetbrains-kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
67-
arturbosch-detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
73+
arturbosch-detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
74+
google-services = { id = "com.google.gms.google-services", version.ref = "googleServicesPlugin" }
75+
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlytics" }

0 commit comments

Comments
 (0)