Commit 21b13392 by 刘鹏

feat:加arouter

parent 78647265
package com.ydl.js.moduler.service
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.js.api.IJsService
@Route(path = "/js/JsService")
class JsImpl : IJsService {
companion object {
var isH5Open = true
......
......@@ -2,9 +2,11 @@ package com.yidianling.muse.moduler.service
import android.app.Activity
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.muse.api.IMuseService
import com.yidianling.muse.activity.ChooseMusicActivity
@Route(path = "/muse/MuseService")
class MuseImpl : IMuseService {
override fun init(context: Context?) {
......
......@@ -4,6 +4,11 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: "../publish.gradle"
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
}
}
android {
compileSdkVersion 28
......@@ -42,6 +47,9 @@ dependencies {
api(rootProject.ext.dependencies["ydl-ijkplayer-jjdxm"]) {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation "com.alibaba:arouter-api:$arouter_api"
// 注意此处的依赖方式:kotlin中使用和java中使用方式有不同
kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api project(':ydl-platform')
implementation project(':api:media')
......
......@@ -2,10 +2,12 @@ package com.ydl.media.moduler.service
import android.app.Activity
import android.content.Context
import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.media.api.IMediaService
import com.ydl.media.audio.AudioPlayer
import com.ydl.media.view.PlayerFloatHelper
@Route(path = "/media/MediaService")
class MediaImpl :IMediaService {
override fun init(context: Context?) {
......
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