Skip to content

Commit

Permalink
升级部分依赖库版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
anjiemo committed Feb 9, 2024
1 parent 7fb63b7 commit 8124cf7
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 27 deletions.
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ static def generateMD5(final file) {
// api 与 implementation 的区别:https://www.jianshu.com/p/8962d6ba936e
dependencies {
def paging_version = "3.2.0"
def nav_version = "2.6.0"
def nav_version = "2.7.7"
def emoji2_version = "1.0.0-beta01"
def room_version = "2.5.2"
def work_version = "2.8.1"
def room_version = "2.6.1"
def work_version = "2.9.0"
def markwon_version = "4.6.2"
def prism_version = "2.0.0"
def qmui_arch_version = '2.0.1'
Expand All @@ -227,10 +227,10 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.activity:activity-ktx:1.7.2'
implementation 'androidx.fragment:fragment-ktx:1.6.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.1'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.activity:activity-ktx:1.8.2'
implementation 'androidx.fragment:fragment-ktx:1.6.2'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'

// Room 数据库:https://developer.android.com/jetpack/androidx/releases/room
// CodeLab:https://developer.android.com/codelabs/android-room-with-a-view-kotlin#0
Expand Down Expand Up @@ -266,11 +266,11 @@ dependencies {
// 网络请求框架:https://github.com/getActivity/EasyHttp
implementation 'com.github.getActivity:EasyHttp:10.2'
// OkHttp 框架:https://github.com/square/okhttp
compileOnly 'com.squareup.okhttp3:okhttp:4.11.0'
compileOnly 'com.squareup.okhttp3:okhttp:4.12.0'
// Android网络请求库:https://github.com/square/retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'

// Json 解析框架:https://github.com/google/gson
implementation 'com.google.code.gson:gson:2.10.1'
Expand Down
20 changes: 13 additions & 7 deletions app/src/main/java/cn/cqautotest/sunnybeach/app/AppApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ import cn.cqautotest.sunnybeach.http.model.RequestHandler
import cn.cqautotest.sunnybeach.http.model.RequestServer
import cn.cqautotest.sunnybeach.ktx.resetConfiguration
import cn.cqautotest.sunnybeach.manager.ActivityManager
import cn.cqautotest.sunnybeach.other.*
import cn.cqautotest.sunnybeach.other.AppConfig
import cn.cqautotest.sunnybeach.other.CrashHandler
import cn.cqautotest.sunnybeach.other.DebugLoggerTree
import cn.cqautotest.sunnybeach.other.SmartBallPulseFooter
import cn.cqautotest.sunnybeach.other.TitleBarStyle
import cn.cqautotest.sunnybeach.other.ToastStyle
import cn.cqautotest.sunnybeach.util.PushHelper
import cn.cqautotest.sunnybeach.work.CacheCleanupWorker
import com.bumptech.glide.Glide
Expand Down Expand Up @@ -77,14 +82,15 @@ class AppApplication : Application(), Configuration.Provider {
override fun onTrimMemory(level: Int) {
super.onTrimMemory(level)
// 根据手机内存剩余情况清理图片内存缓存
GlideApp.get(this).onTrimMemory(level)
GlideApp[this].onTrimMemory(level)
}

override fun getWorkManagerConfiguration(): Configuration = Configuration.Builder().also {
if (AppConfig.isDebug()) {
it.setMinimumLoggingLevel(android.util.Log.INFO)
}
}.build()
override val workManagerConfiguration: Configuration
get() = Configuration.Builder().also {
if (AppConfig.isDebug()) {
it.setMinimumLoggingLevel(android.util.Log.INFO)
}
}.build()

override fun getResources(): Resources = super.getResources().apply {
resetConfiguration()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ScanCodeActivity : ScanKitActivity(), Init {
val options = HmsScanAnalyzerOptions.Creator()
.setHmsScanTypes(HmsScan.QRCODE_SCAN_TYPE)
.create()
val hmsScans = ScanUtil.decodeWithBitmap(this@ScanCodeActivity, bitmap, options)
val hmsScans = ScanUtil.decodeWithBitmap(this, bitmap, options)
setResultAndFinish(hmsScans)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ class SimpleGesture(
) :
GestureDetector.SimpleOnGestureListener() {

override fun onFling(
e1: MotionEvent,
e2: MotionEvent,
velocityX: Float,
velocityY: Float
): Boolean {
override fun onFling(e1: MotionEvent?, e2: MotionEvent, velocityX: Float, velocityY: Float): Boolean {
e1 ?: return false
// 判断是触发左右还是上下
val horizontalDistance = abs(e1.x - e2.x)
val verticalDistance = abs(e1.y - e2.y)
Expand Down Expand Up @@ -47,6 +43,7 @@ class SimpleGesture(
}

interface OnSlideListener {

fun onSwipeLeft() {}

fun onSwipeRight() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ class AvatarDecorView @JvmOverloads constructor(
/**
* 绘制前景徽章图标
*/
override fun onDrawForeground(canvas: Canvas?) {
override fun onDrawForeground(canvas: Canvas) {
super.onDrawForeground(canvas)
canvas ?: return
if (isVip) {
// Timber.d("onDrawForeground:===> width is $width measuredWidth is $measuredWidth")

Expand Down
2 changes: 1 addition & 1 deletion common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android'
android {

// 编译源码版本
compileSdkVersion 33
compileSdkVersion 34
defaultConfig {
// 最低安装版本
minSdkVersion 21
Expand Down
2 changes: 1 addition & 1 deletion library/network/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

// OkHttp 框架:https://github.com/square/okhttp
compileOnly 'com.squareup.okhttp3:okhttp:4.9.1'
compileOnly 'com.squareup.okhttp3:okhttp:4.12.0'
// Android网络请求库:https://github.com/square/retrofit
compileOnly 'com.squareup.retrofit2:retrofit:2.9.0'
}

0 comments on commit 8124cf7

Please sign in to comment.