Update Acra

This commit is contained in:
Jays2Kings 2021-05-27 13:48:28 -04:00
parent 0fa3eef40e
commit 3224398510
3 changed files with 20 additions and 10 deletions

View File

@ -252,7 +252,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.COROUTINES}")
// Crash reports
implementation("ch.acra:acra:${Versions.ACRA}")
implementation("ch.acra:acra-http:5.8.1")
// Text distance
implementation("info.debatty:java-string-similarity:1.2.1")

View File

@ -16,7 +16,9 @@ import eu.kanade.tachiyomi.data.preference.getOrDefault
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
import eu.kanade.tachiyomi.util.system.LocaleHelper
import org.acra.ACRA
import org.acra.annotation.ReportsCrashes
import org.acra.config.httpSender
import org.acra.data.StringFormat
import org.acra.ktx.initAcra
import org.conscrypt.Conscrypt
import timber.log.Timber
import uy.kohesive.injekt.Injekt
@ -25,13 +27,13 @@ import uy.kohesive.injekt.injectLazy
import uy.kohesive.injekt.registry.default.DefaultRegistrar
import java.security.Security
@ReportsCrashes(
formUri = "https://collector.tracepot.com/e90773ff",
reportType = org.acra.sender.HttpSender.Type.JSON,
httpMethod = org.acra.sender.HttpSender.Method.PUT,
buildConfigClass = BuildConfig::class,
excludeMatchingSharedPreferencesKeys = [".*username.*", ".*password.*", ".*token.*"]
)
// @ReportsCrashes(
// formUri = "https://collector.tracepot.com/e90773ff",
// reportType = org.acra.sender.HttpSender.Type.JSON,
// httpMethod = org.acra.sender.HttpSender.Method.PUT,
// buildConfigClass = BuildConfig::class,
// excludeMatchingSharedPreferencesKeys = [".*username.*", ".*password.*", ".*token.*"]
// )
open class App : Application(), LifecycleObserver {
val preferences: PreferencesHelper by injectLazy()
@ -79,6 +81,15 @@ open class App : Application(), LifecycleObserver {
}
protected open fun setupAcra() {
initAcra {
reportFormat = StringFormat.JSON
buildConfigClass = BuildConfig::class.java
excludeMatchingSharedPreferencesKeys = arrayOf(".*username.*", ".*password.*", ".*token.*")
httpSender {
uri = "https://collector.tracepot.com/e90773ff"
httpMethod = org.acra.sender.HttpSender.Method.PUT
}
}
ACRA.init(this)
}

View File

@ -1,5 +1,4 @@
object Versions {
const val ACRA = "4.9.2"
const val CHUCKER = "3.2.0"
const val COIL = "0.11.0"
const val COROUTINES = "1.4.2"