Commit 21b13392 by 刘鹏

feat:加arouter

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