Commit fc9aaf35 by konghaorui

升级组件版本号

parent 23cdea3d
ext { ext {
kotlin_version = "1.3.21" kotlin_version = "1.3.21"
dev_mode = true dev_mode = false
ydl_app = [ ydl_app = [
appName : "心理咨询壹点灵", appName : "心理咨询壹点灵",
...@@ -42,17 +42,17 @@ ext { ...@@ -42,17 +42,17 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.48.1", "m-confide" : "0.0.48.6",
"m-consultant" : "0.0.58.1", "m-consultant" : "0.0.dynamic",
"m-fm" : "0.0.29.1", "m-fm" : "0.0.29.2",
"m-user" : "0.0.59.3", "m-user" : "0.0.59.4",
"m-home" : "0.0.20.2", "m-home" : "0.0.20.3",
"m-im" : "0.0.15.1", "m-im" : "0.0.15.5",
"m-dynamic" : "0.0.7.2", "m-dynamic" : "0.0.7.3",
"m-muse" : "0.0.28.1", "m-muse" : "0.0.28.2",
"m-tests" : "0.0.23.1", "m-tests" : "0.0.23.2",
"m-course" : "0.0.41.1", "m-course" : "0.0.41.2",
//-------------- 业务模块 API 层 -------------- //-------------- 业务模块 API 层 --------------
"m-audioim-api" : "0.0.6", "m-audioim-api" : "0.0.6",
...@@ -69,14 +69,14 @@ ext { ...@@ -69,14 +69,14 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.1", "ydl-platform" : "0.0.39.3",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.1", "ydl-webview" : "0.0.38.3",
"ydl-media" : "0.0.21.1", "ydl-media" : "0.0.21.3",
"ydl-pay" : "0.0.18.1", "ydl-pay" : "0.0.18.3",
"m-audioim" : "0.0.47.5", "m-audioim" : "0.0.48.0",
"ydl-flutter-base": "0.0.10", "ydl-flutter-base": "0.0.10.3",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
...@@ -115,14 +115,14 @@ ext { ...@@ -115,14 +115,14 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.39.1", "ydl-platform" : "0.0.39.3",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.1", "ydl-webview" : "0.0.38.3",
"ydl-media" : "0.0.21.1", "ydl-media" : "0.0.21.3",
"ydl-pay" : "0.0.18.1", "ydl-pay" : "0.0.18.3",
"m-audioim" : "0.0.47.5", "m-audioim" : "0.0.48.0",
"ydl-flutter-base": "0.0.10", "ydl-flutter-base": "0.0.10.3",
//以下 几乎不会动 //以下 几乎不会动
"router" : "0.0.1", "router" : "0.0.1",
...@@ -287,7 +287,6 @@ ext { ...@@ -287,7 +287,6 @@ ext {
"ydl-m-muse-api" : "com.ydl:m-muse-api:${ydlCompileVersion["m-muse-api"]}", "ydl-m-muse-api" : "com.ydl:m-muse-api:${ydlCompileVersion["m-muse-api"]}",
"ydl-m-fm-api" : "com.ydl:m-fm-api:${ydlCompileVersion["m-fm-api"]}", "ydl-m-fm-api" : "com.ydl:m-fm-api:${ydlCompileVersion["m-fm-api"]}",
"ydl-m-tests-api" : "com.ydl:m-tests-api:${ydlCompileVersion["m-tests-api"]}", "ydl-m-tests-api" : "com.ydl:m-tests-api:${ydlCompileVersion["m-tests-api"]}",
"ydl-m-audioim-api" : "com.ydl:m-audioim-api:${ydlCompileVersion["m-audioim-api"]}",
"ydl-m-im-api" : "com.ydl:m-im-api:${ydlCompileVersion["m-im-api"]}", "ydl-m-im-api" : "com.ydl:m-im-api:${ydlCompileVersion["m-im-api"]}",
"ydl-m-home-api" : "com.ydl:m-home-api:${ydlCompileVersion["m-home-api"]}", "ydl-m-home-api" : "com.ydl:m-home-api:${ydlCompileVersion["m-home-api"]}",
"ydl-m-consultant-api" : "com.ydl:m-consultant-api:${ydlCompileVersion["m-consultant-api"]}", "ydl-m-consultant-api" : "com.ydl:m-consultant-api:${ydlCompileVersion["m-consultant-api"]}",
......
...@@ -84,12 +84,10 @@ dependencies { ...@@ -84,12 +84,10 @@ dependencies {
api project(':ydl-platform') api project(':ydl-platform')
api project(':ydl-webview') api project(':ydl-webview')
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-audioim-api')
}else { }else {
//发布时使用 //发布时使用
api rootProject.ext.dependencies["ydl-webview"] api rootProject.ext.dependencies["ydl-webview"]
compileOnly rootProject.ext.dependencies["ydl-m-user-api"] compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
compileOnly rootProject.ext.dependencies["ydl-m-audioim-api"]
api(rootProject.ext.dependencies["ydl-platform"]) { api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true transitive = true
} }
......
modular {
packageName "com.ydl.audioim"
// 模块发布需要的参数
publish {
api {
//发布信息 module/api 通用
groupId = "com.ydl"
artifactId = "m-audioim-api"
version = rootProject.ext.ydlPublishVersion[childProject.getName()+"-api"]
// version = "0.0.5"
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.alibaba:arouter-api:1.4.1'
}
}
}
}
\ No newline at end of file
package com.ydl.audioim
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.audioim.api.AudioImApi
/**
* 模块对外提供接口的实现类
*/
@Route(path = "/audioim/audioimapi")
class AudioImImpl: AudioImApi {
override fun init(context: Context?) {
}
override fun loginAgora(userId: String?) {
YDLavManager.instances.login(userId)
}
}
\ No newline at end of file
...@@ -3,14 +3,17 @@ package com.ydl.audioim ...@@ -3,14 +3,17 @@ package com.ydl.audioim
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.text.TextUtils import android.text.TextUtils
import com.ydl.audioim.http.AudioApiRequestUtil
import com.ydl.ydl_av.messge_service.YDLRTMClient import com.ydl.ydl_av.messge_service.YDLRTMClient
import com.ydl.ydl_av.messge_service.bean.RTMMesssage import com.ydl.ydl_av.messge_service.bean.RTMMesssage
import com.ydl.ydl_av.messge_service.callback.InitListener import com.ydl.ydl_av.messge_service.callback.InitListener
import com.ydl.ydl_av.messge_service.callback.LoginCallback import com.ydl.ydl_av.messge_service.callback.LoginCallback
import com.ydl.ydl_av.messge_service.request.LoginParam import com.ydl.ydl_av.messge_service.request.LoginParam
import com.ydl.audioim.http.AudioApiRequestUtil
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.LogHelper import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.user.api.event.UserLoginEvent
import com.yidianling.user.api.event.UserLogoutEvent
import de.greenrobot.event.EventBus
import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers import io.reactivex.schedulers.Schedulers
...@@ -32,6 +35,15 @@ class YDLavManager { ...@@ -32,6 +35,15 @@ class YDLavManager {
fun init(context: Context,appId:String){ fun init(context: Context,appId:String){
YDLRTMClient.instances.init(context,appId,listener) YDLRTMClient.instances.init(context,appId,listener)
EventBus.getDefault().register(this)
}
public fun onEvent(event: UserLoginEvent) {
instances.login(event.uid)
}
public fun onEvent(event: UserLogoutEvent) {
instances.logout()
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
...@@ -72,6 +84,7 @@ class YDLavManager { ...@@ -72,6 +84,7 @@ class YDLavManager {
* 退出登录 * 退出登录
*/ */
fun logout(){ fun logout(){
EventBus.getDefault().unregister(this)
YDLRTMClient.instances.logout(object : LoginCallback { YDLRTMClient.instances.logout(object : LoginCallback {
override fun onSuccess() { override fun onSuccess() {
//退出登陆成功 //退出登陆成功
......
package com.ydl.audioim.api
import com.alibaba.android.arouter.facade.template.IProvider
/**
* 对外api接口
*/
interface AudioImApi : IProvider {
/**
* 登录声网Im
*/
fun loginAgora(uid:String?)
}
\ No newline at end of file
...@@ -85,10 +85,8 @@ dependencies { ...@@ -85,10 +85,8 @@ dependencies {
//开发时使用 //开发时使用
api project(':ydl-webview') api project(':ydl-webview')
api project(':ydl-platform') api project(':ydl-platform')
api project(':m-audioim')
api project(":ydl-pay") api project(":ydl-pay")
implementation modularPublication('com.ydl:m-user-api') implementation modularPublication('com.ydl:m-user-api')
implementation modularPublication('com.ydl:m-audioim-api')
implementation modularPublication('com.ydl:m-home-api') implementation modularPublication('com.ydl:m-home-api')
implementation modularPublication('com.ydl:m-course-api') implementation modularPublication('com.ydl:m-course-api')
implementation modularPublication('com.ydl:m-im-api') implementation modularPublication('com.ydl:m-im-api')
...@@ -99,11 +97,9 @@ dependencies { ...@@ -99,11 +97,9 @@ dependencies {
compileOnly rootProject.ext.dependencies["ydl-m-user-api"] compileOnly rootProject.ext.dependencies["ydl-m-user-api"]
compileOnly rootProject.ext.dependencies['ydl-m-home-api'] compileOnly rootProject.ext.dependencies['ydl-m-home-api']
compileOnly rootProject.ext.dependencies['ydl-m-course-api'] compileOnly rootProject.ext.dependencies['ydl-m-course-api']
compileOnly rootProject.ext.dependencies["ydl-m-audioim-api"]
compileOnly rootProject.ext.dependencies["ydl-m-im-api"] compileOnly rootProject.ext.dependencies["ydl-m-im-api"]
compileOnly rootProject.ext.dependencies["ydl-m-fm-api"] compileOnly rootProject.ext.dependencies["ydl-m-fm-api"]
compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"] compileOnly rootProject.ext.dependencies["ydl-m-dynamic-api"]
api rootProject.ext.dependencies["m-audioim"]
api rootProject.ext.dependencies["ydl-webview"] api rootProject.ext.dependencies["ydl-webview"]
api rootProject.ext.dependencies["ydl-pay"] api rootProject.ext.dependencies["ydl-pay"]
api(rootProject.ext.dependencies["ydl-platform"]) { api(rootProject.ext.dependencies["ydl-platform"]) {
......
...@@ -36,8 +36,6 @@ object LoginUtils { ...@@ -36,8 +36,6 @@ object LoginUtils {
loginIm(userInfo) loginIm(userInfo)
//设置极光注册id //设置极光注册id
LoginHelper.setChannelId() LoginHelper.setChannelId()
//设置声网登录
UserIn.getAvImApi().loginAgora(userInfo?.uid)
val loginEvent = UserLoginEvent("login", userInfo?.uid!!) val loginEvent = UserLoginEvent("login", userInfo?.uid!!)
EventBus.getDefault().post(loginEvent) EventBus.getDefault().post(loginEvent)
......
...@@ -10,7 +10,6 @@ import android.widget.ToggleButton; ...@@ -10,7 +10,6 @@ import android.widget.ToggleButton;
import com.umeng.socialize.UMAuthListener; import com.umeng.socialize.UMAuthListener;
import com.umeng.socialize.UMShareAPI; import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.bean.SHARE_MEDIA; import com.umeng.socialize.bean.SHARE_MEDIA;
import com.ydl.audioim.YDLavManager;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity; import com.ydl.webview.NewH5Activity;
import com.ydl.ydlcommon.base.BaseActivity; import com.ydl.ydlcommon.base.BaseActivity;
...@@ -278,8 +277,6 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick ...@@ -278,8 +277,6 @@ public class AccountSettingActivity extends BaseActivity implements View.OnClick
* 退出登录 * 退出登录
*/ */
private void LogOut() { private void LogOut() {
YDLavManager.Companion.getInstances().logout();
//清除UserInfo //清除UserInfo
UserHelper.INSTANCE.setUserinfo(null); UserHelper.INSTANCE.setUserinfo(null);
UserIn.INSTANCE.clearImData(); UserIn.INSTANCE.clearImData();
......
...@@ -2,7 +2,6 @@ package com.yidianling.user.route ...@@ -2,7 +2,6 @@ package com.yidianling.user.route
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
import com.ydl.audioim.api.AudioImApi
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.fm.api.service.IFMService import com.yidianling.fm.api.service.IFMService
import com.yidianling.im.api.bean.IMLoginInfo import com.yidianling.im.api.bean.IMLoginInfo
...@@ -74,9 +73,5 @@ object UserIn { ...@@ -74,9 +73,5 @@ object UserIn {
fun clearImData() { fun clearImData() {
getImService().clear() getImService().clear()
} }
// 获取 声网 api
fun getAvImApi(): AudioImApi{
return ModularServiceManager.provide(AudioImApi::class.java)
}
} }
\ No newline at end of file
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