From 3224398510f3891f196e34b168768ff715c9405d Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Thu, 27 May 2021 13:48:28 -0400 Subject: [PATCH] Update Acra --- app/build.gradle.kts | 2 +- app/src/main/java/eu/kanade/tachiyomi/App.kt | 27 ++++++++++++++------ buildSrc/src/main/kotlin/Dependencies.kt | 1 - 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4899e2caee..05e8341bbc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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") diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index 64836136c1..2efc85ea7d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -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) } diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 01e38ebf76..3654b95c01 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -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"