mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
android: integrate firebase crashlytics (#1908)
- Added Firebase dependencies - Integrated crashlytics
This commit is contained in:
10
kotlin/android/.gitignore
vendored
10
kotlin/android/.gitignore
vendored
@@ -27,9 +27,6 @@ render.experimental.xml
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
google-services.json
|
||||
|
||||
# Android Profiling
|
||||
*.hprof
|
||||
|
||||
@@ -105,13 +102,6 @@ proguard/
|
||||
*~
|
||||
*.swp
|
||||
|
||||
# Keystore files
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
# google-services.json
|
||||
|
||||
# Android Patch
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
|
||||
|
||||
10
kotlin/android/app/.gitignore
vendored
10
kotlin/android/app/.gitignore
vendored
@@ -27,9 +27,6 @@ render.experimental.xml
|
||||
*.jks
|
||||
*.keystore
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
google-services.json
|
||||
|
||||
# Android Profiling
|
||||
*.hprof
|
||||
|
||||
@@ -105,13 +102,6 @@ proguard/
|
||||
*~
|
||||
*.swp
|
||||
|
||||
# Keystore files
|
||||
|
||||
# Google Services (e.g. APIs or Firebase)
|
||||
# google-services.json
|
||||
|
||||
# Android Patch
|
||||
|
||||
# External native build folder generated in Android Studio 2.2 and later
|
||||
.externalNativeBuild
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ plugins {
|
||||
id "kotlin-parcelize"
|
||||
id "androidx.navigation.safeargs"
|
||||
id "com.google.android.libraries.mapsplatform.secrets-gradle-plugin"
|
||||
id 'com.google.gms.google-services'
|
||||
id "com.google.firebase.crashlytics"
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -122,4 +124,11 @@ dependencies {
|
||||
androidTestImplementation "androidx.test.ext:junit:1.1.5"
|
||||
|
||||
implementation 'androidx.browser:browser:1.5.0'
|
||||
}
|
||||
|
||||
// Import the BoM for the Firebase platform
|
||||
implementation(platform("com.google.firebase:firebase-bom:32.2.2"))
|
||||
|
||||
// Add the dependencies for the Crashlytics and Analytics libraries
|
||||
// When using the BoM, you don't specify versions in Firebase library dependencies
|
||||
implementation("com.google.firebase:firebase-crashlytics-ktx")
|
||||
implementation("com.google.firebase:firebase-analytics-ktx")}
|
||||
|
||||
47
kotlin/android/app/google-services.json
Normal file
47
kotlin/android/app/google-services.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "215658742954",
|
||||
"project_id": "firezone-55040",
|
||||
"storage_bucket": "firezone-55040.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:215658742954:android:51cc714762dbfbb59e7cd3",
|
||||
"android_client_info": {
|
||||
"package_name": "dev.firezone.android"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "215658742954-bbgadqcdn4d743d7u9gbstbjd1ip6294.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "dev.firezone.android",
|
||||
"certificate_hash": "ee57c4c178df1997dabb60d11b6a9a3e07cbb015"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "215658742954-lgrcn41ahhr8u8juebm2q4nkacnp13d5.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBcmIkMlT1ulYXmIFxQR_eCvWs24gQqBWw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "215658742954-lgrcn41ahhr8u8juebm2q4nkacnp13d5.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -1,7 +1,17 @@
|
||||
package dev.firezone.android.core
|
||||
|
||||
import android.app.Application
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import dev.firezone.android.BuildConfig
|
||||
|
||||
@HiltAndroidApp
|
||||
class FirezoneApp : Application()
|
||||
class FirezoneApp : Application() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
// Disable Crashlytics for debug builds
|
||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!BuildConfig.DEBUG)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,12 @@ buildscript {
|
||||
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3'
|
||||
classpath 'org.mozilla.rust-android-gradle:plugin:0.9.3'
|
||||
|
||||
// Google Play services
|
||||
classpath 'com.google.gms:google-services:4.3.15'
|
||||
|
||||
// Firebase Crashlytics
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.8'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user