构建预警模块与OBU模块

This commit is contained in:
董宏宇
2021-08-03 10:33:42 +08:00
parent 284b722e51
commit 98de735586
13 changed files with 168 additions and 64 deletions

View File

@@ -1,26 +0,0 @@
package com.amap.navi.mogo_module_adas;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.amap.navi.mogo_module_adas.test", appContext.getPackageName());
}
}

View File

@@ -1,17 +0,0 @@
package com.amap.navi.mogo_module_adas;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}

View File

@@ -1,8 +1,5 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'com.alibaba.arouter'
}
@@ -34,9 +31,6 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
@@ -44,6 +38,8 @@ dependencies {
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.rxandroid
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {

View File

@@ -2,17 +2,22 @@ package com.mogo.module.obu.mogo;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.obu.IMoGoObuProvider;
import com.mogo.utils.logger.Logger;
/**
* @author xiaoyuzhou
* @date 2021/8/2 5:52 下午
*/
@Route(path = MogoServicePaths.PATH_V2X_OBU_MOGO)
public class MoGoObuProvider implements IMoGoObuProvider {
private String TAG = "MoGoObuProvider";
@Override
public void init(Context context) {
Logger.d(TAG, "初始化蘑菇自研OBU……");
}
}

View File

@@ -1,8 +1,5 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'com.alibaba.arouter'
}
@@ -34,9 +31,6 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
@@ -44,6 +38,8 @@ dependencies {
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.rxandroid
annotationProcessor rootProject.ext.dependencies.aroutercompiler
if (Boolean.valueOf(RELEASE)) {

View File

@@ -1,3 +1,3 @@
GROUP=com.mogo.module
POM_ARTIFACT_ID=mogo-module-hmi
POM_ARTIFACT_ID=module-hmi
VERSION_CODE=1

View File

@@ -0,0 +1,32 @@
package com.mogo.module.warning;
import android.content.Context;
import androidx.fragment.app.FragmentActivity;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.warning.IMoGoWaringProvider;
import com.mogo.utils.logger.Logger;
/**
* @author xiaoyuzhou
* @date 2021/8/2 5:52 下午
* 预警模块
*/
@Route(path = MogoServicePaths.PATH_V2X_WARNING)
public class MoGoWarningProvider implements IMoGoWaringProvider {
private String TAG = "MoGoWarningProvider";
@Override
public void init(FragmentActivity activity, int containerId) {
}
@Override
public void init(Context context) {
Logger.d(TAG, "初始化蘑菇预警模块……");
}
}