Commit f00a57bc by 严久程
parents 244bf0f8 69d550ff
......@@ -28,10 +28,10 @@ ext {
version = [
androidSupportSdkVersion: "28.0.0",
retrofitSdkVersion : "2.3.0",
retrofitSdkVersion : "2.6.0",
dagger2SdkVersion : "2.23.2",
glideSdkVersion : "4.3.1",
butterknifeSdkVersion : "9.0.0",
butterknifeSdkVersion : "8.8.1",
rxlifecycleSdkVersion : "1.0",
rxlifecycle2SdkVersion : "2.2.2",
espressoSdkVersion : "3.0.1",
......@@ -42,13 +42,13 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.16",
"m-consultant" : "0.0.23",
"m-course" : "0.0.10",
"m-fm" : "0.0.12",
"m-muse" : "0.0.8",
"m-tests" : "0.0.5",
"m-user" : "0.0.26",
"m-confide" : "0.0.18",
"m-consultant" : "0.0.25",
"m-course" : "0.0.11",
"m-fm" : "0.0.14",
"m-muse" : "0.0.10",
"m-tests" : "0.0.7",
"m-user" : "0.0.28",
//-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.1",
"m-confide-api" : "0.0.1",
......@@ -57,18 +57,18 @@ ext {
"m-fm-api" : "0.0.2",
"m-muse-api" : "0.0.1",
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.5",
"m-user-api" : "0.0.7",
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.21",
"ydl-platform" : "0.0.24",
//第二步 若干
"ydl-webview" : "0.0.21",
"ydl-media" : "0.0.10",
"ydl-pay" : "0.0.7",
"m-audioim" : "0.0.13",
"ydl-webview" : "0.0.24",
"ydl-media" : "0.0.12",
"ydl-pay" : "0.0.9",
"m-audioim" : "0.0.15",
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.1",
"ydl-net" : "0.0.2",
"ydl-utils" : "0.0.2",
"ydl-flutter-base": "0.0.3",
]
......@@ -78,7 +78,7 @@ ext {
//第三步 若干
"m-confide" : "0.0.15",
"m-consultant" : "0.0.22",
"m-course" : "0.0.10",
"m-course" : "0.0.8",
"m-fm" : "0.0.11",
"m-muse" : "0.0.7",
"m-tests" : "0.0.4",
......@@ -91,18 +91,18 @@ ext {
"m-fm-api" : "0.0.2",
"m-muse-api" : "0.0.1",
"m-tests-api" : "0.0.1",
"m-user-api" : "0.0.5",
"m-user-api" : "0.0.7",
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.21",
"ydl-platform" : "0.0.24",
//第二步 若干
"ydl-webview" : "0.0.21",
"ydl-media" : "0.0.10",
"ydl-pay" : "0.0.7",
"m-audioim" : "0.0.13",
"ydl-webview" : "0.0.24",
"ydl-media" : "0.0.12",
"ydl-pay" : "0.0.9",
"m-audioim" : "0.0.15",
//以下 几乎不会动
"router" : "0.0.1",
"ydl-net" : "0.0.1",
"ydl-net" : "0.0.2",
"ydl-utils" : "0.0.2",
"ydl-flutter-base": "0.0.3",
]
......@@ -125,7 +125,7 @@ ext {
"retrofit-converter-scalars" : "com.squareup.retrofit2:converter-scalars:${version["retrofitSdkVersion"]}",
"okhttp3" : "com.squareup.okhttp3:okhttp:3.12.3",
"okhttp4" : "com.squareup.okhttp3:okhttp:4.0.0",
"okhttp3-logging" : "com.squareup.okhttp3:logging-interceptor:3.8.0",
"okhttp3-logging" : "com.squareup.okhttp3:logging-interceptor:3.12.2",
"okhttp-urlconnection" : "com.squareup.okhttp:okhttp-urlconnection:2.0.0",
"glide" : "com.github.bumptech.glide:glide:${version["glideSdkVersion"]}",
"glide-compiler" : "com.github.bumptech.glide:compiler:${version["glideSdkVersion"]}",
......@@ -158,7 +158,7 @@ ext {
"rxerrorhandler" : "me.jessyan:rxerrorhandler:1.0.1",
//rx2
"rxandroid2" : "io.reactivex.rxjava2:rxandroid:2.0.1",
"rxandroid2" : "io.reactivex.rxjava2:rxandroid:2.1.1",
"rxjava2" : "io.reactivex.rxjava2:rxjava:2.2.10",
"rxlifecycle2" : "com.trello.rxlifecycle2:rxlifecycle:${version["rxlifecycle2SdkVersion"]}",
"rxlifecycle2-android" : "com.trello.rxlifecycle2:rxlifecycle-android:${version["rxlifecycle2SdkVersion"]}",
......@@ -176,7 +176,6 @@ ext {
"androideventbus" : "org.simple:androideventbus:1.0.5.1",
"otto" : "com.squareup:otto:1.3.8",
"gson" : "com.google.code.gson:gson:2.8.5",
"multidex" : "com.android.support:multidex:1.0.3",
"javax.annotation" : "javax.annotation:jsr250-api:1.0",
"arouter" : "com.alibaba:arouter-api:1.4.1",
"progressmanager" : "me.jessyan:progressmanager:1.5.0",
......@@ -236,10 +235,10 @@ ext {
"imagepicker" : "com.ydl:imagepicker:1.0.6",
"protector" : "com.ydl:protector:1.0.1-SNAPSHOT@aar",
"ydl-hnet" : "com.ydl:h-net:0.0.8",
"ydl-utils" : "com.ydl:ydl-utils:0.0.2",
"ydl-net" : "com.ydl:ydl-net:0.0.1",
"ydl-user-router" : "com.ydl:router:1.0.0-SNAPSHOT@aar",
"ydl-device" : "com.ydl:device-id:0.0.7@aar",
"ydl-net" : "com.ydl:ydl-net:${ydlCompileVersion["ydl-net"]}",
"ydl-utils" : "com.ydl:ydl-utils:${ydlCompileVersion["ydl-utils"]}",
//flutter功能组件升级===>发布ydl-flutter-base组件===>引用flutter相关的业务模块
"ydl-flutter" : "com.ydl:ydl-flutter:0.0.7@aar",
......
......@@ -62,17 +62,10 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
kapt 'com.alibaba:arouter-compiler:1.2.2'
implementation 'com.jakewharton:butterknife:8.8.1'
api 'com.github.princekin-f:EasyFloat:1.1.2'
// api 'com.dou361.ijkplayer-armv5:jjdxm-ijkplayer-armv5:1.0.0'
// api 'com.dou361.ijkplayer-arm64:jjdxm-ijkplayer-arm64:1.0.0'
// api 'com.dou361.ijkplayer-x86:jjdxm-ijkplayer-x86:1.0.0'
// api 'com.dou361.ijkplayer-x86_64:jjdxm-ijkplayer-x86_64:1.0.0'
// api('com.dou361.ijkplayer:jjdxm-ijkplayer:1.0.6') {
// exclude group: 'com.android.support', module: 'appcompat-v7'
// }
api 'com.github.princekin-f:EasyFloat:1.1.2'
api rootProject.ext.dependencies["ydl-user-router"]
api rootProject.ext.dependencies["butterknife"]
if (rootProject.ext.dev_mode){
//开发时使用
implementation modularPublication('com.ydl:m-user-api')
......
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-api"
//开发时注释掉版本号,发布api时打开
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
//version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
......@@ -64,9 +64,8 @@ object UserHelper {
try {
return SharedPreferencesEditor.getFileString(user_info_name_sp, user_info_key_sp)
} catch (e: Exception) {
userTemp = UserResponseBean()
return ""
}
return gson.toJson(userTemp)
}
fun updateUserinfo(userInfo: UserResponseBean.UserInfo?) {
......@@ -139,8 +138,7 @@ object UserHelper {
try {
return SharedPreferencesEditor.getFileString(user_setting_name_sp, user_setting_key_sp)
} catch (e: Exception) {
userSetting = UserSettingBean()
return ""
}
return gson.toJson(userSetting)
}
}
\ No newline at end of file
......@@ -27,16 +27,26 @@ import com.yidianling.user.ui.login.RegisterAndLoginActivity
class UserRouterImp : IUserRouter {
val gson: Gson = Gson()
override fun getUserSetting(): UserSetting {
return gson.fromJson(UserHelper.getUserSettingStr(), UserSetting::class.java)
override fun getUserSetting(): UserSetting? {
var infoStr = UserHelper.getUserSettingStr()
if (TextUtils.isEmpty(infoStr)){
return null
}
return gson.fromJson(infoStr, UserSetting::class.java)
}
override fun updateUserInfoSp(userInfo: UserResponse.UserInfo?) {
val info:UserResponseBean.UserInfo = gson.fromJson(gson.toJson(userInfo), UserResponseBean.UserInfo::class.java)
if (userInfo==null){
return
}
val info:UserResponseBean.UserInfo = gson.fromJson( gson.toJson(userInfo), UserResponseBean.UserInfo::class.java)
UserHelper.updateUserinfo(info)
}
override fun updateUserSetingSp(userSetting: UserSetting?) {
if (userSetting==null){
return
}
val info:UserSettingBean= gson.fromJson(gson.toJson(userSetting), UserSettingBean::class.java)
UserHelper.updateUserSetting(info)
}
......@@ -50,8 +60,12 @@ class UserRouterImp : IUserRouter {
UserHelper.setUserinfo(info)
}
override fun getUserResponse(): UserResponse {
return gson.fromJson(UserHelper.getUserInfoStr(), UserResponse::class.java)
override fun getUserResponse(): UserResponse? {
var infoStr = UserHelper.getUserInfoStr()
if (TextUtils.isEmpty(infoStr)){
return null
}
return gson.fromJson(infoStr,UserResponse::class.java)
}
override fun isLogin(): Boolean {
......
......@@ -40,15 +40,16 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
api 'com.squareup.retrofit2:retrofit:2.6.0'
api 'com.squareup.retrofit2:converter-gson:2.6.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.6.0'
api "io.reactivex.rxjava2:rxjava:2.2.10"
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
api 'com.squareup.retrofit2:converter-scalars:2.4.0'
api 'com.squareup.okhttp3:logging-interceptor:3.12.2'
api rootProject.ext.dependencies["gson"]
api rootProject.ext.dependencies["rxjava2"]
api(rootProject.ext.dependencies["rxandroid2"]) {
exclude module: 'rxjava'
}
api rootProject.ext.dependencies["retrofit"]
api rootProject.ext.dependencies["okhttp3-logging"]
api rootProject.ext.dependencies["retrofit-converter-gson"]
api rootProject.ext.dependencies["retrofit-converter-scalars"]
api rootProject.ext.dependencies["retrofit-adapter-rxjava2"]
}
......@@ -41,22 +41,6 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.facebook.stetho:stetho-okhttp3:1.4.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'de.greenrobot:eventbus:2.4.0'
api 'com.umeng.sdk:share-wechat:6.9.1'
if (rootProject.ext.dev_mode){
//开发时使用
api project(':ydl-platform')
......
......@@ -75,7 +75,12 @@ dependencies {
api rootProject.ext.dependencies["ydl-pushagent"]
api rootProject.ext.dependencies["ydl-notracepoint"]
api rootProject.ext.dependencies["ydl-hnet"]
api rootProject.ext.dependencies["imagepicker"]
api(rootProject.ext.dependencies["imagepicker"]) {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
}
api rootProject.ext.dependencies["ydl-utils"]
api rootProject.ext.dependencies["ydl-js"]
api rootProject.ext.dependencies["ydl-net"]
......@@ -83,6 +88,9 @@ dependencies {
api rootProject.ext.dependencies["ptr-lib-release"]
api(rootProject.ext.dependencies["ydl-device"]) {
transitive = true
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
}
api(rootProject.ext.dependencies["ydl-router"]) {
transitive = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment