From 824e220aa8cb0ac7caa6a0ed46804726ff967a11 Mon Sep 17 00:00:00 2001 From: huangjian Date: Wed, 14 Sep 2022 16:22:48 +0800 Subject: [PATCH] =?UTF-8?q?SDK=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android_crop_lib/build.gradle | 4 +-- app/build.gradle | 14 ++++---- .../erban/skill/repository/SkillModel.kt | 10 +++--- build.gradle | 2 +- library/build.gradle | 33 ++++++++++--------- .../interceptor/HttpLoggingInterceptor.java | 2 +- 6 files changed, 33 insertions(+), 32 deletions(-) diff --git a/android_crop_lib/build.gradle b/android_crop_lib/build.gradle index 66932ea93..0cd97952f 100644 --- a/android_crop_lib/build.gradle +++ b/android_crop_lib/build.gradle @@ -23,9 +23,9 @@ android { } dependencies { - api 'androidx.annotation:annotation:1.1.0' + api 'androidx.annotation:annotation:1.4.0' api 'androidx.legacy:legacy-support-v4:1.0.0' - implementation "androidx.core:core-ktx:1.3.2" + implementation "androidx.core:core-ktx:1.7.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } repositories { diff --git a/app/build.gradle b/app/build.gradle index dfd74299c..5d6570171 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -153,7 +153,7 @@ android { buildConfigField "String", "BASE_URL_RELEASE", "\"https://api.lecheng163.com/\"" minifyEnabled false shrinkResources false - signingConfig signingConfigs.v1 + signingConfig signingConfigs.v2 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -171,17 +171,17 @@ android { } -def Lombok = "1.18.10" +def Lombok = "1.18.18" dependencies { implementation fileTree(dir: 'libs', include: ['*.jar','*.aar']) implementation fileTree(dir: 'aliyun-libs', include: ['*.jar','*.aar']) - testImplementation 'junit:junit:4.13.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' api 'androidx.multidex:multidex:2.0.1' - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1' api "com.orhanobut:dialogplus:1.11@aar" @@ -202,7 +202,7 @@ dependencies { api "com.jakewharton:butterknife:10.2.3" annotationProcessor "com.jakewharton:butterknife-compiler:10.2.3" implementation "com.llew.huawei:verifier:1.0.3" - annotationProcessor 'androidx.annotation:annotation:1.1.0' + annotationProcessor 'androidx.annotation:annotation:1.4.0' implementation 'io.github.h07000223:flycoTabLayout:3.0.0' @@ -235,7 +235,7 @@ dependencies { implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4' // 易盾一键登录 - implementation 'io.github.yidun:quicklogin:3.1.5' + implementation 'io.github.yidun:quicklogin:3.1.8' implementation 'com.github.fodroid:XRadioGroup:v1.5' //华为推送 diff --git a/app/src/main/java/com/yizhuan/erban/skill/repository/SkillModel.kt b/app/src/main/java/com/yizhuan/erban/skill/repository/SkillModel.kt index 69af36498..1022eb83e 100644 --- a/app/src/main/java/com/yizhuan/erban/skill/repository/SkillModel.kt +++ b/app/src/main/java/com/yizhuan/erban/skill/repository/SkillModel.kt @@ -11,11 +11,13 @@ import com.yizhuan.xchat_android_core.utils.net.RxHelper import com.yizhuan.xchat_android_library.net.rxnet.RxNet import io.reactivex.Single import okhttp3.MediaType +import okhttp3.MediaType.Companion.toMediaType import okhttp3.RequestBody +import okhttp3.RequestBody.Companion.toRequestBody class SkillModel : BaseModel(), ISkillModel { private val api: Api = RxNet.create(Api::class.java) - override fun getUserAllSkillCardDetail(uid:Long): Single> = + override fun getUserAllSkillCardDetail(uid: Long): Single> = api.getUserAllSkillCardDetail(uid).compose(RxHelper.handleCommon { ArrayList(0) }) @@ -33,9 +35,7 @@ class SkillModel : BaseModel(), ISkillModel { override fun saveSkillInfo(entity: SkillPostServerEntity): Single { val json = Gson().toJson(entity) - val requestBody = RequestBody.create( - MediaType.parse("Content-Type, application/json"), json - ) + val requestBody = json.toRequestBody("Content-Type, application/json".toMediaType()) return api.saveCardInfo(requestBody) .compose(RxHelper.handleIgnoreData()) } @@ -50,7 +50,7 @@ class SkillModel : BaseModel(), ISkillModel { .compose(RxHelper.handleCommon()) } - override fun getUserInfoSkillList(uid:Long): Single> { + override fun getUserInfoSkillList(uid: Long): Single> { return api.getUserInfoSkillList(uid) .compose(RxHelper.handleCommon { ArrayList(0) }) } diff --git a/build.gradle b/build.gradle index 9d8d0c698..9999b46fd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.5.31' + ext.kotlin_version = '1.7.10' println "\n\n\n" println '当前选择版本 Version Name:'+ version_name diff --git a/library/build.gradle b/library/build.gradle index f0a418655..c78c4b217 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -35,10 +35,11 @@ android { } dependencies { - def glideVersion = "4.11.0" + + def glideVersion = "4.13.1" def retrofitVersion = "2.9.0" - def okhttp3 = "3.14.9" - def okio = "2.2.2" + def okhttp3 = "4.9.3" + def okio = "2.8.0" def rxjava_adapter = "2.3.0" def rxjava = "2.1.7" def rxjava_android = "2.0.1" @@ -47,34 +48,34 @@ dependencies { def qiniu = "7.3.15" def SmartRefreshLayoutVersion = "1.0.3" def eventbusVersion = "3.0.0" - def fragment_version = "1.2.5" - + def fragment_version = "1.3.6" implementation fileTree(dir: 'libs', include: ['*.jar']) - testImplementation 'junit:junit:4.13.1' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' - api 'androidx.constraintlayout:constraintlayout:2.1.3' - api 'androidx.appcompat:appcompat:1.2.0' - api 'androidx.recyclerview:recyclerview:1.1.0' + api 'androidx.constraintlayout:constraintlayout:2.1.4' + api 'androidx.appcompat:appcompat:1.4.2' + api 'androidx.recyclerview:recyclerview:1.2.1' api 'androidx.cardview:cardview:1.0.0' api 'androidx.gridlayout:gridlayout:1.0.0' - api "androidx.core:core-ktx:1.3.2" + api "androidx.core:core-ktx:1.7.0" api "androidx.fragment:fragment:$fragment_version" api "androidx.fragment:fragment-ktx:$fragment_version" - api 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' + api 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1' api 'androidx.lifecycle:lifecycle-extensions:2.2.0' - api 'com.google.android.material:material:1.2.1' + api 'com.google.android.material:material:1.5.0' api "com.squareup.retrofit2:retrofit:${retrofitVersion}" api "com.squareup.okhttp3:okhttp:${okhttp3}" api "com.squareup.okhttp3:logging-interceptor:${okhttp3}" - api "com.squareup.retrofit2:adapter-rxjava2:${rxjava_adapter}" - api 'com.google.code.gson:gson:2.8.7' api "com.squareup.okio:okio:${okio}" + api "com.squareup.retrofit2:adapter-rxjava2:${rxjava_adapter}" + api 'com.google.code.gson:gson:2.9.0' + api "com.scwang.smartrefresh:SmartRefreshLayout:${SmartRefreshLayoutVersion}" api "com.scwang.smartrefresh:SmartRefreshHeader:${SmartRefreshLayoutVersion}" diff --git a/library/src/main/java/com/yizhuan/xchat_android_library/net/rxnet/interceptor/HttpLoggingInterceptor.java b/library/src/main/java/com/yizhuan/xchat_android_library/net/rxnet/interceptor/HttpLoggingInterceptor.java index 41afe60cd..2f209466c 100644 --- a/library/src/main/java/com/yizhuan/xchat_android_library/net/rxnet/interceptor/HttpLoggingInterceptor.java +++ b/library/src/main/java/com/yizhuan/xchat_android_library/net/rxnet/interceptor/HttpLoggingInterceptor.java @@ -110,7 +110,7 @@ public final class HttpLoggingInterceptor implements Interceptor { void log(String message); /** A {@link Logger} defaults output appropriate for the current platform. */ - Logger DEFAULT = message -> Platform.get().log(INFO, message, null); + Logger DEFAULT = message -> Platform.get().log( message, INFO,null); } public HttpLoggingInterceptor() {