Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xb2016 committed Apr 22, 2024
1 parent 17b2d28 commit da7ef4d
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 35 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ plugins {

android {
compileSdk = 34
buildToolsVersion = "34.0"
ndkVersion = "26.1.10909125"
buildToolsVersion = "34.0.0"
ndkVersion = "26.3.11579264"

splits {
abi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.view.View
import androidx.core.view.ViewCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import androidx.recyclerview.widget.RecyclerView.ItemDecoration
Expand Down Expand Up @@ -152,7 +151,7 @@ class LinearDividerItemDecoration(orientation: Int, color: Int, thickness: Int)
val itemCount = adapter.itemCount
val overlap = mOverlap
if (mOrientation == VERTICAL) {
val isRtl = ViewCompat.getLayoutDirection(parent) == ViewCompat.LAYOUT_DIRECTION_RTL
val isRtl = parent.layoutDirection == View.LAYOUT_DIRECTION_RTL
val mPaddingLeft: Int
val mPaddingRight: Int
if (isRtl) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/hippo/ehviewer/client/EhEngine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.asRequestBody
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.executeAsync
import okhttp3.coroutines.executeAsync
import org.json.JSONArray
import org.json.JSONObject
import org.jsoup.Jsoup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import com.hippo.ehviewer.EhApplication.Companion.noRedirectOkHttpClient
import com.hippo.okhttp.ChromeRequestBuilder
import okhttp3.Request
import okhttp3.Response
import okhttp3.executeAsync
import okhttp3.coroutines.executeAsync

class EhRequestBuilder constructor(
class EhRequestBuilder(
url: String,
referer: String? = null,
origin: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import okhttp3.Request
import okhttp3.executeAsync
import okhttp3.coroutines.executeAsync
import okio.BufferedSource
import okio.buffer
import okio.source
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/hippo/ehviewer/spider/SpiderDen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import com.hippo.util.runSuspendCatching
import com.hippo.util.sendTo
import com.hippo.yorozuya.FileUtils
import okhttp3.Response
import okhttp3.executeAsync
import okhttp3.coroutines.executeAsync
import okio.buffer
import okio.sink
import java.io.File
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/hippo/ehviewer/spider/SpiderQueen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import kotlinx.coroutines.sync.Semaphore
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.sync.withPermit
import kotlinx.coroutines.withTimeout
import okhttp3.executeAsync
import okhttp3.coroutines.executeAsync
import java.util.concurrent.atomic.AtomicInteger
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class GalleryActivity : EhActivity(), OnSeekBarChangeListener, GalleryView.Liste
private val requestStoragePermissionLauncher = registerForActivityResult(
ActivityResultContracts.RequestPermission(),
) { result ->
if (result!! && mSavingPage != -1) {
if (result && mSavingPage != -1) {
saveImage(mSavingPage)
} else {
Toast.makeText(this, R.string.error_cant_save_image, Toast.LENGTH_SHORT).show()
Expand Down Expand Up @@ -288,7 +288,7 @@ class GalleryActivity : EhActivity(), OnSeekBarChangeListener, GalleryView.Liste
buildProvider()
}

override fun onNewIntent(intent: Intent?) {
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
handleIntent(intent)
buildProvider(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class GalleryDetailScene :
}
val w = mColorBg!!.width
val h = mColorBg!!.height
return if (ViewCompat.isAttachedToWindow(mColorBg!!) && w != 0 && h != 0) {
return if (mColorBg!!.isAttachedToWindow && w != 0 && h != 0) {
val resources = context.resources
val keylineMargin = resources.getDimensionPixelSize(R.dimen.keyline_margin)
val thumbWidth = resources.getDimensionPixelSize(R.dimen.gallery_detail_thumb_width)
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/java/com/hippo/ehviewer/widget/EhStageLayout.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import android.util.AttributeSet
import android.view.View
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.coordinatorlayout.widget.CoordinatorLayout.AttachedBehavior
import androidx.core.view.ViewCompat
import androidx.interpolator.view.animation.FastOutSlowInInterpolator
import com.google.android.material.snackbar.Snackbar.SnackbarLayout
import com.hippo.scene.StageLayout
Expand Down Expand Up @@ -98,7 +97,7 @@ class EhStageLayout @JvmOverloads constructor(
)
).toDouble(),
).toFloat()
ViewCompat.animate(view).setInterpolator(FastOutSlowInInterpolator())
view.animate().setInterpolator(FastOutSlowInInterpolator())
.translationY(translationY).setDuration(150).start()
}
}
Expand All @@ -111,11 +110,8 @@ class EhStageLayout @JvmOverloads constructor(
dependency: View,
) {
for (i in 0 until child.aboveSnackViewCount) {
val view = child.getAboveSnackViewAt(i)
if (view != null) {
ViewCompat.animate(view).setInterpolator(FastOutSlowInInterpolator())
.translationY(0f).setDuration(75).start()
}
child.getAboveSnackViewAt(i)?.animate()?.setInterpolator(FastOutSlowInInterpolator())?.translationY(0f)
?.setDuration(75)?.start()
}
}
}
Expand Down
30 changes: 16 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
[versions]
agp = "8.2.2"
agp = "8.3.2"
android-tools-r8 = "8.3.37"
androidx-activity = "1.8.2"
androidx-appcompat = "1.6.1"
androidx-activity = "1.9.0"
androidx-appcompat = "1.7.0-alpha03"
androidx-biometric = "1.2.0-alpha05"
androidx-browser = "1.8.0"
androidx-collection = "1.4.0"
androidx-coordinatorlayout = "1.2.0"
androidx-core = "1.12.0"
androidx-fragment = "1.6.2"
androidx-coordinatorlayout = "1.3.0-alpha02"
androidx-core = "1.13.0"
androidx-fragment = "1.8.0-alpha02"
androidx-lifecycle = "2.7.0"
androidx-paging = "3.2.1"
androidx-preference = "1.2.1"
androidx-recyclerview = "1.3.2"
androidx-room = "2.6.1"
androidx-swiperefreshlayout = "1.2.0-alpha01"
coil = "2.5.0"
coil = "2.6.0"
drawer = "1.0.3"
google-android-material = "1.11.0"
jsoup = "1.17.2"
kotlin = "1.9.23"
kotlinx-coroutines = "1.8.0"
ksp = "1.9.23-1.0.19"
okhttp3 = "5.0.0-alpha.11"
ksp = "1.9.23-1.0.20"
okhttp3 = "5.0.0-alpha.14"
okio = "3.9.0"
rikkax-material = { strictly = "1.6.6" }
spotless = "6.25.0"

[libraries]
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
Expand All @@ -37,14 +40,13 @@ androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process",
androidx-paging-runtime = { module = "androidx.paging:paging-runtime-ktx", version.ref = "androidx-paging" }
androidx-preference = { module = "androidx.preference:preference-ktx", version.ref = "androidx-preference" }
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "androidx-recyclerview" }

androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
androidx-room-paging = { module = "androidx.room:room-paging", version.ref = "androidx-room" }

androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version.ref = "androidx-swiperefreshlayout" }

coil = { module = "io.coil-kt:coil", version.ref = "coil" }
drawer = "com.drakeet.drawer:drawer:1.0.3"
jsoup = "org.jsoup:jsoup:1.17.2"
drawer = { module = "com.drakeet.drawer:drawer", version.ref = "drawer" }
jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
material = { module = "com.google.android.material:material", version.ref = "google-android-material" }

Expand All @@ -68,4 +70,4 @@ android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
spotless = { id = "com.diffplug.spotless", version = "6.25.0" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit da7ef4d

Please sign in to comment.