build: disable crashlytics on debug builds

This commit is contained in:
Zane Schepke 2023-07-18 17:07:36 -04:00
parent 68b0902398
commit 509d22a98c
2 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
@ -70,5 +69,8 @@
<meta-data
android:name="com.google.mlkit.vision.DEPENDENCIES"
android:value="barcode_ui"/>
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="true" />
</application>
</manifest>

View File

@ -1,6 +1,8 @@
package com.zaneschepke.wireguardautotunnel
import android.app.Application
import com.google.android.datatransport.BuildConfig
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.zaneschepke.wireguardautotunnel.repository.Repository
import com.zaneschepke.wireguardautotunnel.service.tunnel.model.Settings
import dagger.hilt.android.HiltAndroidApp
@ -15,7 +17,10 @@ class WireGuardAutoTunnel : Application() {
override fun onCreate() {
super.onCreate()
if(BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
if(BuildConfig.DEBUG) {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);
Timber.plant(Timber.DebugTree())
}
settingsRepo.init()
}
}