升级:androidx组件和kotlin版本

This commit is contained in:
pppscn 2023-01-29 11:42:10 +08:00
parent 6eb2ca2b1b
commit 442c29fd3d
4 changed files with 17 additions and 17 deletions

View File

@ -184,11 +184,11 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation deps.espresso.core
implementation 'androidx.core:core-ktx:1.8.0'
implementation "androidx.activity:activity-ktx:1.5.1"
implementation "androidx.fragment:fragment-ktx:1.5.4"
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.activity:activity-ktx:1.6.1'
implementation 'androidx.fragment:fragment-ktx:1.5.5'
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.preference:preference-ktx:1.2.0'
//
@ -221,7 +221,7 @@ dependencies {
api("androidx.work:work-runtime-ktx:2.7.1")
//Android Room
def room_version = '2.4.3'
def room_version = '2.5.0'
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-paging:$room_version"

View File

@ -104,10 +104,12 @@ class App : Application(), CactusCallback, Configuration.Provider by Core {
//动态加载FrpcLib
val libPath = filesDir.absolutePath + "/libs"
val soFile = File(libPath)
try {
TinkerLoadLibrary.installNativeLibraryPath(classLoader, soFile)
} catch (throwable: Throwable) {
Log.e("APP", throwable.message.toString())
if (soFile.exists()) {
try {
TinkerLoadLibrary.installNativeLibraryPath(classLoader, soFile)
} catch (throwable: Throwable) {
Log.e("APP", throwable.message.toString())
}
}
//启动前台服务
@ -145,7 +147,7 @@ class App : Application(), CactusCallback, Configuration.Provider by Core {
Log.d("GlobalScope", "UserAppList = $UserAppList")
Log.d("GlobalScope", "SystemAppList = $SystemAppList")
}.onFailure {
Log.e("GlobalScope", it.message.toString())
//Log.e("GlobalScope", it.message.toString())
}
}
}

View File

@ -7,7 +7,6 @@ import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import com.idormy.sms.forwarder.BuildConfig
import com.idormy.sms.forwarder.database.dao.FrpcDao
import com.idormy.sms.forwarder.database.dao.LogsDao
import com.idormy.sms.forwarder.database.dao.RuleDao
@ -18,7 +17,6 @@ import com.idormy.sms.forwarder.database.entity.Rule
import com.idormy.sms.forwarder.database.entity.Sender
import com.idormy.sms.forwarder.database.ext.Converters
import com.idormy.sms.forwarder.utils.DATABASE_NAME
import java.util.concurrent.Executors
@Database(
entities = [Frpc::class, Logs::class, Rule::class, Sender::class],
@ -99,11 +97,11 @@ custom_domains = smsf.demo.com
MIGRATION_9_10,
)
if (BuildConfig.DEBUG) {
/*if (BuildConfig.DEBUG) {
builder.setQueryCallback({ sqlQuery, bindArgs ->
println("SQL_QUERY: $sqlQuery\nBIND_ARGS: $bindArgs")
}, Executors.newSingleThreadExecutor())
}
}*/
return builder.build()
}

View File

@ -5,7 +5,7 @@ def build_versions = [:]
build_versions.version_code = 49
build_versions.version_name = "3.1.1"
build_versions.min_sdk = 19
build_versions.target_sdk = 32
build_versions.target_sdk = 33
build_versions.build_tools = "33.0.1"
ext.build_versions = build_versions
@ -22,7 +22,7 @@ versions.androidx = "1.4.1"
versions.recyclerview = "1.2.1"
versions.material = "1.5.0"
versions.junit = "4.13.2"
versions.espresso = "3.4.0"
versions.espresso = '3.5.1'
versions.constraint_layout = "2.1.3"
versions.glide = "4.13.1"
versions.rxjava2 = "2.2.21"
@ -34,7 +34,7 @@ versions.gson = "2.10.1" //https://github.com/google/gson
versions.okhttp3 = "3.12.13" // API 19
versions.leakcanary = "2.10" //https://github.com/square/leakcanary
versions.lifecycle = "2.2.0"
versions.kotlin = '1.6.21'
versions.kotlin = '1.7.21'
//========xlibrary start========//