Move ACRA endpoint config to build.gradle.kts

(cherry picked from commit 3319ccfd41a75b5c80a4b05aa2a9f41e1739a50f)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/App.kt
This commit is contained in:
arkon 2021-01-17 11:09:29 -05:00 committed by Jobobby04
parent 54071507c1
commit a47e88a953
2 changed files with 11 additions and 21 deletions

View File

@ -24,17 +24,6 @@ if (!gradle.startParameter.taskRequests.toString().contains("Debug")) {
shortcutHelper.setFilePath("./shortcuts.xml") shortcutHelper.setFilePath("./shortcuts.xml")
fun runCommand(command: String): String {
val byteOut = ByteArrayOutputStream()
project.exec {
commandLine = command.split(" ")
standardOutput = byteOut
}
return String(byteOut.toByteArray()).trim()
}
android { android {
compileSdkVersion(AndroidConfig.compileSdk) compileSdkVersion(AndroidConfig.compileSdk)
buildToolsVersion(AndroidConfig.buildTools) buildToolsVersion(AndroidConfig.buildTools)
@ -376,3 +365,12 @@ fun getBuildTime(): String {
df.timeZone = TimeZone.getTimeZone("UTC") df.timeZone = TimeZone.getTimeZone("UTC")
return df.format(Date()) return df.format(Date())
} }
fun runCommand(command: String): String {
val byteOut = ByteArrayOutputStream()
project.exec {
commandLine = command.split(" ")
standardOutput = byteOut
}
return String(byteOut.toByteArray()).trim()
}

View File

@ -57,6 +57,8 @@ import kotlin.time.days
open class App : Application(), LifecycleObserver { open class App : Application(), LifecycleObserver {
private val preferences: PreferencesHelper by injectLazy()
private lateinit var firebaseAnalytics: FirebaseAnalytics private lateinit var firebaseAnalytics: FirebaseAnalytics
override fun onCreate() { override fun onCreate() {
@ -67,15 +69,6 @@ open class App : Application(), LifecycleObserver {
workaroundAndroid7BrokenSSL() workaroundAndroid7BrokenSSL()
// Debug tool; see https://fbflipper.com/
// SoLoader.init(this, false)
// if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
// val client = AndroidFlipperClient.getInstance(this)
// client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()))
// client.addPlugin(DatabasesFlipperPlugin(this))
// client.start()
// }
// TLS 1.3 support for Android < 10 // TLS 1.3 support for Android < 10
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
Security.insertProviderAt(Conscrypt.newProvider(), 1) Security.insertProviderAt(Conscrypt.newProvider(), 1)
@ -135,7 +128,6 @@ open class App : Application(), LifecycleObserver {
@OnLifecycleEvent(Lifecycle.Event.ON_STOP) @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
@Suppress("unused") @Suppress("unused")
fun onAppBackgrounded() { fun onAppBackgrounded() {
val preferences: PreferencesHelper by injectLazy()
if (preferences.lockAppAfter().get() >= 0) { if (preferences.lockAppAfter().get() >= 0) {
SecureActivityDelegate.locked = true SecureActivityDelegate.locked = true
} }