From 8ff4ab21918e61fbde6c3ccd970ad85624d3b21d Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Thu, 2 Jul 2020 12:40:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 2 +- app/build.gradle | 2 + .../com/mogo/launcher/MogoApplication.java | 4 + config.gradle | 4 +- gradle.properties | 2 + modules/mogo-module-event-panel/build.gradle | 62 +++++++++--- .../mogo-module-event-panel/gradle.properties | 3 + .../event/panel/EventPanelConstants.java | 11 +++ .../event/panel/EventPanelModuleProvider.java | 96 +++++++++++++++++++ 9 files changed, 170 insertions(+), 16 deletions(-) create mode 100644 modules/mogo-module-event-panel/gradle.properties create mode 100644 modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelConstants.java create mode 100644 modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelModuleProvider.java diff --git a/.idea/misc.xml b/.idea/misc.xml index 21e99e2dc0..cd77a1f062 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 67c618542f..3756f8c735 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -210,6 +210,7 @@ dependencies { releaseImplementation rootProject.ext.dependencies.gpssimulatornoop implementation rootProject.ext.dependencies.modulemedia implementation rootProject.ext.dependencies.moduleservice + implementation rootProject.ext.dependencies.moduleventpanel } else { launcherImplementation project(':main-extensions:mogo-module-main-launcher') // launcherImplementation project(':modules:mogo-module-main') @@ -223,6 +224,7 @@ dependencies { releaseImplementation project(':modules:mogo-module-gps-simulator-noop') implementation project(':modules:mogo-module-media') implementation project(':modules:mogo-module-service') + implementation project(':modules:mogo-module-event-panel') } } diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 89331eb122..af4f5f520c 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -24,6 +24,7 @@ import com.mogo.service.connection.IMogoSocketManager; import com.mogo.utils.logger.LogLevel; import com.mogo.utils.logger.Logger; import com.zhidao.boot.persistent.lib.PersistentManager; +import com.zhidao.mogo.module.event.panel.EventPanelConstants; /** * @author congtaowang @@ -60,6 +61,9 @@ public class MogoApplication extends AbsMogoApplication { MogoModulePaths.addModule(new MogoModule(TanluConstants.TAG, TanluConstants.MODEL_NAME)); MogoModulePaths.addModule(new MogoModule(MogoServicePaths.PATH_SHARE, "ShareControl")); + MogoModulePaths.addModule(new MogoModule(EventPanelConstants.PATH_NAME, + EventPanelConstants.MODULE_NAME)); + MogoModulePaths.addBaseModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) ); MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.PATH_V2X_UI ) ); // 暂时去掉推送 diff --git a/config.gradle b/config.gradle index b70e2a2ee4..68dbbc5268 100644 --- a/config.gradle +++ b/config.gradle @@ -158,6 +158,8 @@ ext { tanluupload : "com.mogo.module:module-tanlu-upload:${TANLULIB_VERSION}", // obu sdk - obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.1" + obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.1", + //事件面板 + moduleventpanel : "com.mogo.module:module-event-panel:${MOGO_MODULE_EVENT_PANEL_VERSION}" ] } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index de5e7528bb..dbd37bcd37 100644 --- a/gradle.properties +++ b/gradle.properties @@ -80,6 +80,8 @@ MOGO_MODULE_PUSH_VERSION=1.0.1 MOGO_MODULE_AD_CARD_VERSION=1.0.1 # 探路上报和分享模块 TANLULIB_VERSION=1.2.1.9 +# 事件面板模块 +MOGO_MODULE_EVENT_PANEL_VERSION = 1.0.0-SNAPSHOT # Boost分包 diff --git a/modules/mogo-module-event-panel/build.gradle b/modules/mogo-module-event-panel/build.gradle index 45e15563ae..7698c52390 100644 --- a/modules/mogo-module-event-panel/build.gradle +++ b/modules/mogo-module-event-panel/build.gradle @@ -1,17 +1,23 @@ apply plugin: 'com.android.library' +apply plugin: 'com.alibaba.arouter' android { - compileSdkVersion 29 - buildToolsVersion "29.0.3" - + compileSdkVersion rootProject.ext.android.compileSdkVersion + // buildToolsVersion rootProject.ext.android.buildToolsVersion defaultConfig { - minSdkVersion 19 - targetSdkVersion 29 - versionCode 1 - versionName "1.0" + 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" + consumerProguardFiles 'consumer-rules.pro' } buildTypes { @@ -20,13 +26,41 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } + + compileOptions { + targetCompatibility 1.8 + sourceCompatibility 1.8 + } + } dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation 'androidx.appcompat:appcompat:1.1.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation rootProject.ext.dependencies.androidxcardview + implementation rootProject.ext.dependencies.androidxappcompat + implementation rootProject.ext.dependencies.androidxconstraintlayout + implementation rootProject.ext.dependencies.arouter + annotationProcessor rootProject.ext.dependencies.aroutercompiler + implementation rootProject.ext.dependencies.rxjava + implementation rootProject.ext.dependencies.rxandroid -} \ No newline at end of file + if (Boolean.valueOf(RELEASE)) { +// api rootProject.ext.dependencies.mogomap +// api rootProject.ext.dependencies.mogomapapi +// api rootProject.ext.dependencies.mogoutils +// api rootProject.ext.dependencies.mogocommons +// api rootProject.ext.dependencies.mogoserviceapi + compileOnly rootProject.ext.dependencies.modulecommon + } else { +// api project(":libraries:mogo-map") +// api project(":libraries:mogo-map-api") +// api project(":foudations:mogo-utils") +// api project(":foudations:mogo-commons") +// api project(':services:mogo-service-api') + compileOnly project(':modules:mogo-module-common') +// implementation project(':modules:mogo-module-share') +// implementation project(':modules:mogo-module-authorize') + } +} + +apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() diff --git a/modules/mogo-module-event-panel/gradle.properties b/modules/mogo-module-event-panel/gradle.properties new file mode 100644 index 0000000000..6bd32ac3d6 --- /dev/null +++ b/modules/mogo-module-event-panel/gradle.properties @@ -0,0 +1,3 @@ +GROUP=com.mogo.module +POM_ARTIFACT_ID=module-event-panel +VERSION_CODE=1 diff --git a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelConstants.java b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelConstants.java new file mode 100644 index 0000000000..99ad266ce4 --- /dev/null +++ b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelConstants.java @@ -0,0 +1,11 @@ +package com.zhidao.mogo.module.event.panel; + +/** + * 事件面板相关常量 + * + * @author tongchenfei + */ +public class EventPanelConstants { + public static final String MODULE_NAME = "MODULE_EVENT_PANEL"; + public static final String PATH_NAME = "/event/panel"; +} diff --git a/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelModuleProvider.java b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelModuleProvider.java new file mode 100644 index 0000000000..62456b63bb --- /dev/null +++ b/modules/mogo-module-event-panel/src/main/java/com/zhidao/mogo/module/event/panel/EventPanelModuleProvider.java @@ -0,0 +1,96 @@ +package com.zhidao.mogo.module.event.panel; + +import android.content.Context; +import android.os.Bundle; +import android.view.View; + +import androidx.annotation.NonNull; +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 static com.zhidao.mogo.module.event.panel.EventPanelConstants.MODULE_NAME; +import static com.zhidao.mogo.module.event.panel.EventPanelConstants.PATH_NAME; + +/** + * 事件面板provider + * + * @author tongchenfei + */ +@Route(path = PATH_NAME) +public class EventPanelModuleProvider implements IMogoModuleProvider { + + /** + * Do your init work in this method, it well be call when processor has been load. + * + * @param context ctx + */ + @Override + public void init(Context context) { + Logger.d(MODULE_NAME,"模块初始化===="); + } + + @Override + public Fragment createFragment(Context context, Bundle data) { + return null; + } + + @Override + public View createView(Context context) { + return null; + } + + @NonNull + @Override + public String getModuleName() { + return MODULE_NAME; + } + + @Override + public IMogoModuleLifecycle getCardLifecycle() { + return null; + } + + @Override + public IMogoMapListener getMapListener() { + return null; + } + + @Override + public int getType() { + return 0; + } + + @Override + public IMogoNaviListener getNaviListener() { + return null; + } + + @Override + public IMogoLocationListener getLocationListener() { + return null; + } + + @Override + public IMogoMarkerClickListener getMarkerClickListener() { + return null; + } + + @Override + public String getAppPackage() { + return null; + } + + @Override + public String getAppName() { + return null; + } + +}