Commit 7394a142 by 洪国微
parents 70c68386 fed1af12
......@@ -167,7 +167,6 @@ dependencies {
if (true) {
//开发模式
api project(':m-user')
api project(':m-fm')
api project(':m-tests')
api project(':m-consultant')
api (project(':ydl-platform')){
......@@ -175,6 +174,12 @@ dependencies {
}
implementation project(':ydl-webview')
implementation project(':ydl-media')
// api rootProject.ext.dependencies["ydl-m-fm-module-ydl"]
// api rootProject.ext.dependencies["ydl-m-fm-api"]
api project(':m-fm')
implementation modularPublication('com.ydl:m-fm-api')
} else {
//发布模式
api 'com.ydl:m-user-module-ydl:0.0.6'
......
......@@ -19,9 +19,11 @@ import com.ydl.component.mvp.DemoPresenter
import com.ydl.media.audio.PlayService
import com.ydl.ydl_router.manager.YDLRouterManager
import com.ydl.ydl_router.manager.YDLRouterParams
import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import com.ydl.ydlcommon.router.IYDLRouterConstant
import com.yidianling.common.tools.ToastUtil
import com.yidianling.fm.api.service.IFMService
import com.yidianling.tests.home.TestHomeActivity
import kotlinx.android.synthetic.main.activity_main.*
......@@ -111,7 +113,8 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
bt_to_fm.setOnClickListener {
YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST)
startActivity(ModularServiceManager.provide(IFMService::class.java).fmListIntent(this))
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_FM_LIST)
}
}
......
......@@ -54,7 +54,7 @@ buildscript {
classpath 'com.tencent.bugly:symtabfileuploader:2.2.1'
//微信资源混淆
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.16'
classpath 'com.ydl.plugins:modular:1.0.0'
classpath 'com.ydl.plugins:modular:1.0.2'
classpath 'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath 'com.github.better.restools:ResTools:1.0.1'
}
......
......@@ -169,12 +169,16 @@ ext {
"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',
//Modular Api
"ydl-user-router" : 'com.ydl:router:1.0.0-SNAPSHOT@aar',
"ydl-platform" : 'com.ydl:ydl-platform:0.0.11@aar',
//功能组件
"ydl-platform" : 'com.ydl:ydl-platform:0.0.13@aar',
"ydl-webview" : 'com.ydl:ydl-webview:0.0.15@aar',
//业务组件
"ydl-m-user-api" : 'com.ydl:m-user-api:0.0.5',
"ydl-webview" : 'com.ydl:ydl-webview:0.0.14@aar',
"ydl-m-muse-api" : 'com.ydl:m-muse-api:0.0.1@aar'
"ydl-m-muse-api" : 'com.ydl:m-muse-api:0.0.1',
"ydl-m-fm-api" : 'com.ydl:m-fm-api:0.0.2',
"ydl-m-fm-module-ydl" : 'com.ydl:m-fm-module-ydl:0.0.1@aar'
]
}
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-consultant-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.12"
version = "0.0.13"
}
ydl{
groupId = "com.ydl"
artifactId = "m-consultant-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.12"
version = "0.0.13"
}
}
......
......@@ -69,18 +69,18 @@ dependencies {
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api rootProject.ext.dependencies["ydl-user-router"]
if (rootProject.ext.dev_mode){
//开发时使用
api project(":ydl-platform")
api project(':m-user')
implementation project(':ydl-media')
implementation modularPublication('com.ydl:m-user-api')
implementation project(':ydl-media')
} else {
//发布时使用
api rootProject.ext.dependencies["ydl-m-user-api"]
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
implementation project(':ydl-media')
implementation rootProject.ext.dependencies["ydl-m-user-api"]
implementation rootProject.ext.dependencies["ydl-platform"]
}
}
......@@ -15,7 +15,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-fm-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.1"
version = "0.0.6"
}
}
......@@ -24,7 +24,7 @@ modular {
groupId = "com.ydl"
artifactId = "m-fm-api"
//开发时注释掉版本号,发布api时打开
//version = "0.0.1"
version = "0.0.2"
// API 层打包时需要引入的依赖
apiDependencies {
implementation "com.google.code.gson:gson:2.8.2"
......
package com.yidianling.fm;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.widget.PopupWindow;
......@@ -35,8 +38,10 @@ public class FMActivity extends BaseActivity {
private PopupWindow popupWindow;
public static Intent newIntent(Activity activity) {
Intent intent = new Intent(activity, FMActivity.class);
return intent;
}
@Override
protected int layoutResId() {
return R.layout.fm_activity_fm;
......
package com.yidianling.fm.modular
import android.app.Activity
import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper
import com.yidianling.fm.FMActivity
import com.yidianling.fm.FMDetailActivity
import com.yidianling.fm.api.service.IFMService
/**
* Created by xj on 2019/11/6.
*/
@Route(path = "/fm/FMService")
class FMServiceImpl : IFMService {
constructor()
override fun init(context: Context?) {
}
/**
* 打开FM列表页面
*/
override fun fmListIntent(activity: Activity): Intent {
return FMActivity.newIntent(activity)
}
/**
* 打开FM播放页面
*/
override fun fmDetailIntent(activity: Activity, id: Int): Intent {
return FMDetailActivity.newIntent(activity, id)
}
/**
* 打开FM播放页面
*/
override fun fmDetailIntent(activity: Activity, id: Int, isSplash: Boolean): Intent {
return FMDetailActivity.newIntent(activity, id, isSplash)
}
/**
* 获取FM播放ID
*/
override fun getFmId(): Int {
return PlayerFloatHelper.getFmId()
}
/**
* 关闭音乐播放
*/
override fun closePlayer() {
if (AudioPlayer.get().isPlaying) {
AudioPlayer.get().stopPlayer()
}
}
/**
* 判断是否正在播放中
*/
override fun isPlaying(): Boolean {
return AudioPlayer.get().isPlaying
}
/**
* 暂停播放
*/
override fun pause(){
AudioPlayer.get().pausePlayer()
}
override fun replay() {}
}
\ No newline at end of file
......@@ -15,7 +15,6 @@ object FMIn {
fun isLogin(): Boolean {
return ModularServiceManager.provide(IUserService::class.java).isLogin()
// return RouterManager.getUserRouter()?.isLogin()?:false
}
fun mainIntent(activity: Activity): Intent? {
......
package com.yidianling.fm.api.service
import android.app.Activity
import android.content.Intent
import com.alibaba.android.arouter.facade.template.IProvider
/**
......@@ -7,4 +9,19 @@ import com.alibaba.android.arouter.facade.template.IProvider
*/
interface IFMService: IProvider{
fun fmListIntent(activity: Activity): Intent
fun fmDetailIntent(activity: Activity, id: Int): Intent
fun fmDetailIntent(activity: Activity, id: Int, isSplash: Boolean): Intent
fun getFmId(): Int
fun closePlayer()
fun isPlaying(): Boolean
fun pause()
fun replay()
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="fm_google_green">#fdbd00</color>
<color name="fm_google_green">#FFDD33</color>
</resources>
\ No newline at end of file
......@@ -68,6 +68,7 @@ dependencies {
implementation project(':ydl-media')
} else {
//发布时使用
implementation project(':ydl-media')
api(rootProject.ext.dependencies["ydl-platform"]) {
transitive = true
}
......
......@@ -78,7 +78,6 @@ dependencies {
implementation modularPublication('com.ydl:m-test-api')
}else {
//发布时使用
// compileOnly rootProject.ext.dependencies["ydl-m-test-api"]
implementation modularPublication('com.ydl:m-test-api')
api rootProject.ext.dependencies["ydl-webview"]
api(rootProject.ext.dependencies["ydl-platform"]) {
......
......@@ -8,14 +8,14 @@ modular {
groupId = "com.ydl"
artifactId = "m-user-module-xlzx"
// 上报的 心理咨询 业务模块 aar 包的版本号
version = "0.0.20"
version = "0.0.21"
}
ydl{
groupId = "com.ydl"
artifactId = "m-user-module-ydl"
// 上报的 壹点灵 业务模块 aar 包的版本号
version = "0.0.20"
version = "0.0.21"
}
}
......
IS_PUBLISH=true
VERSION_NAME=0.0.1
\ No newline at end of file
VERSION_NAME=0.0.4
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.11
\ No newline at end of file
VERSION_NAME=0.0.13
\ No newline at end of file
IS_PUBLISH=true
VERSION_NAME=0.0.14
\ No newline at end of file
VERSION_NAME=0.0.15
\ 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