Dependency upgrade
This commit is contained in:
@@ -7,7 +7,7 @@ apply plugin: 'kotlinx-serialization'
|
||||
if (file("google-services.json").exists() && file("src/debug/google-services.json").exists()) {
|
||||
logger.lifecycle("Firebase Enabled")
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
} else {
|
||||
logger.lifecycle("Firebase Disabled")
|
||||
@@ -50,12 +50,12 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def markwonVersion = "3.0.1"
|
||||
def markwonVersion = '3.1.0'
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
@@ -66,8 +66,9 @@ dependencies {
|
||||
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
||||
implementation 'com.google.android.material:material:1.3.0-alpha01'
|
||||
implementation 'com.google.firebase:firebase-core:17.4.3'
|
||||
implementation 'com.google.firebase:firebase-analytics:17.4.3'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:17.1.0'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.7'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
implementation 'com.github.arimorty:floatingsearchview:2.1.1'
|
||||
implementation 'com.github.clans:fab:1.6.4'
|
||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||
|
||||
@@ -25,8 +25,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.bumptech.glide.RequestManager
|
||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import kotlinx.android.synthetic.main.item_reader.view.*
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -105,8 +104,9 @@ class ReaderAdapter(private val glide: RequestManager,
|
||||
glide.clear(holder.view.image)
|
||||
|
||||
if (progress?.isNaN() == true) {
|
||||
if (Fabric.isInitialized())
|
||||
Crashlytics.logException(DownloadWorker.getInstance(holder.view.context).exception[galleryID]?.get(position))
|
||||
FirebaseCrashlytics.getInstance().recordException(
|
||||
DownloadWorker.getInstance(holder.view.context).exception[galleryID]?.get(position)!!
|
||||
)
|
||||
|
||||
glide
|
||||
.load(R.drawable.image_broken_variant)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package xyz.quaver.pupil.ui
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.Animatable
|
||||
@@ -46,9 +47,8 @@ import com.arlib.floatingsearchview.FloatingSearchView
|
||||
import com.arlib.floatingsearchview.suggestions.model.SearchSuggestion
|
||||
import com.arlib.floatingsearchview.util.view.SearchInputView
|
||||
import com.bumptech.glide.Glide
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import kotlinx.android.synthetic.main.activity_main.*
|
||||
import kotlinx.android.synthetic.main.activity_main_content.*
|
||||
import kotlinx.coroutines.*
|
||||
@@ -421,6 +421,7 @@ class MainActivity : AppCompatActivity() {
|
||||
loadBlocks()
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private fun setupRecyclerView() {
|
||||
with(main_recyclerview) {
|
||||
adapter = GalleryBlockAdapter(Glide.with(this@MainActivity), galleries).apply {
|
||||
@@ -1058,8 +1059,8 @@ class MainActivity : AppCompatActivity() {
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
if (Fabric.isInitialized() && e.message != "No result")
|
||||
Crashlytics.logException(e)
|
||||
if (e.message != "No result")
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
main_noresult.visibility = View.VISIBLE
|
||||
|
||||
@@ -33,9 +33,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.vectordrawable.graphics.drawable.Animatable2Compat
|
||||
import androidx.vectordrawable.graphics.drawable.AnimatedVectorDrawableCompat
|
||||
import com.bumptech.glide.Glide
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import kotlinx.android.synthetic.main.activity_reader.*
|
||||
import kotlinx.android.synthetic.main.activity_reader.view.*
|
||||
import kotlinx.android.synthetic.main.dialog_numberpicker.view.*
|
||||
@@ -91,8 +90,7 @@ class ReaderActivity : AppCompatActivity() {
|
||||
|
||||
handleIntent(intent)
|
||||
|
||||
if (Fabric.isInitialized())
|
||||
Crashlytics.setInt("GalleryID", galleryID)
|
||||
FirebaseCrashlytics.getInstance().setCustomKey("GalleryID", galleryID)
|
||||
|
||||
if (galleryID == 0) {
|
||||
onBackPressed()
|
||||
|
||||
@@ -24,7 +24,7 @@ import android.util.Base64
|
||||
import android.util.Log
|
||||
import android.util.SparseArray
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import kotlinx.coroutines.*
|
||||
import xyz.quaver.Code
|
||||
import xyz.quaver.hitomi.GalleryBlock
|
||||
@@ -187,7 +187,7 @@ class Cache(context: Context) : ContextWrapper(context) {
|
||||
retval = try {
|
||||
source.value.invoke()
|
||||
} catch (e: Exception) {
|
||||
Crashlytics.logException(e)
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
null
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
import androidx.core.app.TaskStackBuilder
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.crashlytics.android.Crashlytics
|
||||
import io.fabric.sdk.android.Fabric
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import kotlinx.coroutines.*
|
||||
import okhttp3.*
|
||||
import okio.*
|
||||
@@ -77,7 +76,7 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont
|
||||
private var bufferedSource : BufferedSource? = null
|
||||
|
||||
override fun contentLength() = responseBody.contentLength()
|
||||
override fun contentType() = responseBody.contentType() ?: null
|
||||
override fun contentType() = responseBody.contentType()
|
||||
|
||||
override fun source(): BufferedSource {
|
||||
if (bufferedSource == null)
|
||||
@@ -154,8 +153,9 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont
|
||||
val response = chain.proceed(request)
|
||||
|
||||
response.newBuilder()
|
||||
.body(ProgressResponseBody(request.tag(), response.body(), progressListener))
|
||||
.build()
|
||||
.body(response.body()?.let {
|
||||
ProgressResponseBody(request.tag(), it, progressListener)
|
||||
}).build()
|
||||
}
|
||||
|
||||
val client =
|
||||
@@ -289,8 +289,8 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont
|
||||
val callback = object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {
|
||||
Log.i("PUPILD", "FAIL ${call.request().tag()} (${e.message})")
|
||||
if (Fabric.isInitialized() && e.message != "Canceled")
|
||||
Crashlytics.logException(e)
|
||||
if (e.message != "Canceled")
|
||||
FirebaseCrashlytics.getInstance().recordException(e)
|
||||
|
||||
progress[galleryID]?.set(i, Float.NaN)
|
||||
exception[galleryID]?.set(i, e)
|
||||
@@ -316,7 +316,7 @@ class DownloadWorker private constructor(context: Context) : ContextWrapper(cont
|
||||
|
||||
try {
|
||||
response.body().use {
|
||||
Cache(this@DownloadWorker).putImage(galleryID, i, ext, it.byteStream())
|
||||
Cache(this@DownloadWorker).putImage(galleryID, i, ext, it!!.byteStream())
|
||||
}
|
||||
progress[galleryID]?.set(i, Float.POSITIVE_INFINITY)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ data class ProxyInfo(
|
||||
}
|
||||
|
||||
fun authenticator() = Authenticator { _, response ->
|
||||
val credential = Credentials.basic(username, password)
|
||||
val credential = Credentials.basic(username ?: "", password ?: "")
|
||||
|
||||
response.request().newBuilder()
|
||||
.header("Proxy-Authorization", credential)
|
||||
|
||||
@@ -5,7 +5,6 @@ buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||
@@ -15,7 +14,7 @@ buildscript {
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
classpath 'io.fabric.tools:gradle:1.31.0'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
|
||||
classpath 'com.google.firebase:perf-plugin:1.3.1'
|
||||
}
|
||||
}
|
||||
@@ -25,7 +24,7 @@ allprojects {
|
||||
google()
|
||||
jcenter()
|
||||
maven { url "https://jitpack.io" }
|
||||
maven { url 'http://guardian.github.com/maven/repo-releases' }
|
||||
maven { url 'https://guardian.github.com/maven/repo-releases' }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ apply plugin: 'kotlinx-serialization'
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0"
|
||||
implementation 'org.jsoup:jsoup:1.12.1'
|
||||
implementation 'org.jsoup:jsoup:1.13.1'
|
||||
testImplementation 'junit:junit:4.13'
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ fun getReader(galleryID: Int) : Reader {
|
||||
with(URL(url).openConnection(proxy) as HttpsURLConnection) {
|
||||
setRequestProperty("User-Agent", user_agent)
|
||||
setRequestProperty("Cookie", cookie)
|
||||
connectTimeout = 2000
|
||||
connectTimeout = 1000
|
||||
connect()
|
||||
|
||||
inputStream.bufferedReader().use { it.readText() }
|
||||
|
||||
Reference in New Issue
Block a user