添加左侧面板空实现
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -36,6 +36,7 @@
|
|||||||
<option value="$PROJECT_DIR$/modules/mogo-module-gps-simulator-noop" />
|
<option value="$PROJECT_DIR$/modules/mogo-module-gps-simulator-noop" />
|
||||||
<option value="$PROJECT_DIR$/modules/mogo-module-guide" />
|
<option value="$PROJECT_DIR$/modules/mogo-module-guide" />
|
||||||
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel" />
|
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel" />
|
||||||
|
<option value="$PROJECT_DIR$/modules/mogo-module-left-panel-noop" />
|
||||||
<option value="$PROJECT_DIR$/modules/mogo-module-main" />
|
<option value="$PROJECT_DIR$/modules/mogo-module-main" />
|
||||||
<option value="$PROJECT_DIR$/modules/mogo-module-map" />
|
<option value="$PROJECT_DIR$/modules/mogo-module-map" />
|
||||||
<option value="$PROJECT_DIR$/modules/mogo-module-media" />
|
<option value="$PROJECT_DIR$/modules/mogo-module-media" />
|
||||||
|
|||||||
@@ -224,9 +224,9 @@ dependencies {
|
|||||||
f8xxImplementation rootProject.ext.dependencies.moduleventpanel
|
f8xxImplementation rootProject.ext.dependencies.moduleventpanel
|
||||||
// 左侧面板分渠道引用
|
// 左侧面板分渠道引用
|
||||||
d82xImplementation rootProject.ext.dependencies.moduleleftpanel
|
d82xImplementation rootProject.ext.dependencies.moduleleftpanel
|
||||||
d8xxImplementation rootProject.ext.dependencies.moduleleftpanel
|
d8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||||
e8xxImplementation rootProject.ext.dependencies.moduleleftpanel
|
e8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||||
f8xxImplementation rootProject.ext.dependencies.moduleleftpanel
|
f8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
|
||||||
} else {
|
} else {
|
||||||
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
|
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
|
||||||
// launcherImplementation project(':modules:mogo-module-main')
|
// launcherImplementation project(':modules:mogo-module-main')
|
||||||
@@ -247,9 +247,9 @@ dependencies {
|
|||||||
f8xxImplementation project(':modules:mogo-module-event-panel')
|
f8xxImplementation project(':modules:mogo-module-event-panel')
|
||||||
// 左侧面板分渠道引用
|
// 左侧面板分渠道引用
|
||||||
d82xImplementation project(':modules:mogo-module-left-panel')
|
d82xImplementation project(':modules:mogo-module-left-panel')
|
||||||
d8xxImplementation project(':modules:mogo-module-left-panel')
|
d8xxImplementation project(':modules:mogo-module-left-panel-noop')
|
||||||
e8xxImplementation project(':modules:mogo-module-left-panel')
|
e8xxImplementation project(':modules:mogo-module-left-panel-noop')
|
||||||
f8xxImplementation project(':modules:mogo-module-left-panel')
|
f8xxImplementation project(':modules:mogo-module-left-panel-noop')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,8 @@ ext {
|
|||||||
// 事件面板空实现
|
// 事件面板空实现
|
||||||
moduleventpanelnoop : "com.mogo.module:module-event-panel-noop:${MOGO_MODULE_EVENT_PANEL_VERSION}",
|
moduleventpanelnoop : "com.mogo.module:module-event-panel-noop:${MOGO_MODULE_EVENT_PANEL_VERSION}",
|
||||||
// 左侧面板
|
// 左侧面板
|
||||||
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}"
|
moduleleftpanel : "com.mogo.module:module-left-panel:${MOGO_MODULE_LEFT_PANEL_VERSION}",
|
||||||
|
// 左侧面板空实现
|
||||||
|
moduleleftpanelnoop : "com.mogo.module:module-left-panel-noop:${MOGO_MODULE_LEFT_PANEL_VERSION}"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
1
modules/mogo-module-left-panel-noop/.gitignore
vendored
Normal file
1
modules/mogo-module-left-panel-noop/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/build
|
||||||
55
modules/mogo-module-left-panel-noop/build.gradle
Normal file
55
modules/mogo-module-left-panel-noop/build.gradle
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
apply plugin: 'kotlin-kapt'
|
||||||
|
apply plugin: 'kotlin-android'
|
||||||
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
apply plugin: 'com.alibaba.arouter'
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||||
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||||
|
versionCode Integer.valueOf(VERSION_CODE)
|
||||||
|
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
||||||
|
|
||||||
|
javaCompileOptions {
|
||||||
|
annotationProcessorOptions {
|
||||||
|
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles 'consumer-rules.pro'
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
targetCompatibility 1.8
|
||||||
|
sourceCompatibility 1.8
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
|
implementation rootProject.ext.dependencies.androidxccorektx
|
||||||
|
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
|
||||||
|
implementation rootProject.ext.dependencies.androidxappcompat
|
||||||
|
implementation rootProject.ext.dependencies.arouter
|
||||||
|
kapt rootProject.ext.dependencies.aroutercompiler
|
||||||
|
|
||||||
|
if (Boolean.valueOf(RELEASE)) {
|
||||||
|
compileOnly rootProject.ext.dependencies.modulecommon
|
||||||
|
} else {
|
||||||
|
compileOnly project(':modules:mogo-module-common')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||||
3
modules/mogo-module-left-panel-noop/gradle.properties
Normal file
3
modules/mogo-module-left-panel-noop/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
GROUP=com.mogo.module
|
||||||
|
POM_ARTIFACT_ID=module-left-panel-noop
|
||||||
|
VERSION_CODE=1
|
||||||
21
modules/mogo-module-left-panel-noop/proguard-rules.pro
vendored
Normal file
21
modules/mogo-module-left-panel-noop/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Add project specific ProGuard rules here.
|
||||||
|
# You can control the set of applied configuration files using the
|
||||||
|
# proguardFiles setting in build.gradle.
|
||||||
|
#
|
||||||
|
# For more details, see
|
||||||
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||||
|
|
||||||
|
# If your project uses WebView with JS, uncomment the following
|
||||||
|
# and specify the fully qualified class name to the JavaScript interface
|
||||||
|
# class:
|
||||||
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||||
|
# public *;
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Uncomment this to preserve the line number information for
|
||||||
|
# debugging stack traces.
|
||||||
|
#-keepattributes SourceFile,LineNumberTable
|
||||||
|
|
||||||
|
# If you keep the line number information, uncomment this to
|
||||||
|
# hide the original source file name.
|
||||||
|
#-renamesourcefileattribute SourceFile
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.zhidao.mogo.module.left.panel
|
||||||
|
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
import org.junit.runner.RunWith
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instrumented test, which will execute on an Android device.
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
@RunWith(AndroidJUnit4::class)
|
||||||
|
class ExampleInstrumentedTest {
|
||||||
|
@Test
|
||||||
|
fun useAppContext() {
|
||||||
|
// Context of the app under test.
|
||||||
|
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||||
|
assertEquals("com.zhidao.mogo.module.left.panel.test", appContext.packageName)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.zhidao.mogo.module.left.panel">
|
||||||
|
|
||||||
|
/
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.zhidao.mogo.module.left.panel
|
||||||
|
|
||||||
|
object LeftPanelConst {
|
||||||
|
const val MODULE_NAME = "MODULE_LEFT_PANEL"
|
||||||
|
const val PATH_NAME = "/left/panel"
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.zhidao.mogo.module.left.panel
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.View
|
||||||
|
import androidx.fragment.app.Fragment
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.mogo.map.listener.IMogoMapListener
|
||||||
|
import com.mogo.map.location.IMogoLocationListener
|
||||||
|
import com.mogo.map.marker.IMogoMarkerClickListener
|
||||||
|
import com.mogo.map.navi.IMogoNaviListener
|
||||||
|
import com.mogo.service.module.IMogoModuleLifecycle
|
||||||
|
import com.mogo.service.module.IMogoModuleProvider
|
||||||
|
import com.mogo.utils.logger.Logger
|
||||||
|
import com.zhidao.mogo.module.left.panel.LeftPanelConst.MODULE_NAME
|
||||||
|
import com.zhidao.mogo.module.left.panel.LeftPanelConst.PATH_NAME
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 适配1+16增加的位于左侧的面板页provider的空实现
|
||||||
|
*
|
||||||
|
* @author tongchenfei
|
||||||
|
*/
|
||||||
|
@Route(path = PATH_NAME)
|
||||||
|
class LeftPanelProvider:IMogoModuleProvider {
|
||||||
|
override fun getNaviListener(): IMogoNaviListener? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLocationListener(): IMogoLocationListener? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getType(): Int {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getMarkerClickListener(): IMogoMarkerClickListener? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun init(context: Context?) {
|
||||||
|
Logger.d(MODULE_NAME, "左侧面板noop模块初始化===")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getMapListener(): IMogoMapListener? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAppPackage(): String {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createView(context: Context?): View? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun createFragment(context: Context?, data: Bundle?): Fragment? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getModuleName(): String {
|
||||||
|
return MODULE_NAME
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getAppName(): String {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getCardLifecycle(): IMogoModuleLifecycle? {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.zhidao.mogo.module.left.panel
|
||||||
|
|
||||||
|
import org.junit.Test
|
||||||
|
|
||||||
|
import org.junit.Assert.*
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Example local unit test, which will execute on the development machine (host).
|
||||||
|
*
|
||||||
|
* See [testing documentation](http://d.android.com/tools/testing).
|
||||||
|
*/
|
||||||
|
class ExampleUnitTest {
|
||||||
|
@Test
|
||||||
|
fun addition_isCorrect() {
|
||||||
|
assertEquals(4, 2 + 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
include ':modules:mogo-module-left-panel-noop'
|
||||||
include ':modules:mogo-module-left-panel'
|
include ':modules:mogo-module-left-panel'
|
||||||
include ':modules:mogo-module-event-panel-noop'
|
include ':modules:mogo-module-event-panel-noop'
|
||||||
include ':modules:mogo-module-event-panel'
|
include ':modules:mogo-module-event-panel'
|
||||||
|
|||||||
@@ -29,4 +29,6 @@
|
|||||||
./gradlew :main-extensions:mogo-module-main-launcher:clean :main-extensions:mogo-module-main-launcher:uploadArchives
|
./gradlew :main-extensions:mogo-module-main-launcher:clean :main-extensions:mogo-module-main-launcher:uploadArchives
|
||||||
./gradlew :modules:mogo-module-event-panel:clean :modules:mogo-module-event-panel:uploadArchives
|
./gradlew :modules:mogo-module-event-panel:clean :modules:mogo-module-event-panel:uploadArchives
|
||||||
./gradlew :modules:mogo-module-event-panel-noop:clean :modules:mogo-module-event-panel-noop:uploadArchives
|
./gradlew :modules:mogo-module-event-panel-noop:clean :modules:mogo-module-event-panel-noop:uploadArchives
|
||||||
|
./gradlew :modules:mogo-module-left-panel:clean :modules:mogo-module-left-panel:uploadArchives
|
||||||
|
./gradlew :modules:mogo-module-left-panel-noop:clean :modules:mogo-module-left-panel-noop:uploadArchives
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user