移除冗余模块:module-tanlu-api
This commit is contained in:
1
.idea/gradle.xml
generated
1
.idea/gradle.xml
generated
@@ -21,7 +21,6 @@
|
||||
<option value="$PROJECT_DIR$/libraries/map-autonavi" />
|
||||
<option value="$PROJECT_DIR$/libraries/mogo-map" />
|
||||
<option value="$PROJECT_DIR$/libraries/mogo-map-api" />
|
||||
<option value="$PROJECT_DIR$/libraries/mogo-tanlu-api" />
|
||||
<option value="$PROJECT_DIR$/libraries/tanlulib" />
|
||||
<option value="$PROJECT_DIR$/main-extensions" />
|
||||
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-independent" />
|
||||
|
||||
@@ -343,7 +343,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.moduletanlu, {
|
||||
exclude group: 'com.mogo.module', module: 'module-share'
|
||||
}
|
||||
implementation rootProject.ext.dependencies.moduletanluapi
|
||||
implementation rootProject.ext.dependencies.tanluupload
|
||||
implementation rootProject.ext.dependencies.mogomonitor
|
||||
implementation rootProject.ext.dependencies.mogomoduleback
|
||||
implementation rootProject.ext.dependencies.guideshow
|
||||
@@ -359,7 +359,7 @@ dependencies {
|
||||
implementation project(':modules:mogo-module-tanlu'), {
|
||||
exclude group: 'com.mogo.module', module: 'module-share'
|
||||
}
|
||||
implementation project(':libraries:mogo-tanlu-api')
|
||||
implementation project(':libraries:tanlulib')
|
||||
implementation project(':modules:mogo-module-monitor')
|
||||
implementation project(':modules:mogo-module-back')
|
||||
implementation project(':modules:mogo-module-guide')
|
||||
|
||||
@@ -33,7 +33,6 @@ import com.mogo.utils.logger.Logger;
|
||||
import com.squareup.leakcanary.LeakCanary;
|
||||
import com.zhidao.boot.persistent.lib.PersistentManager;
|
||||
import com.zhidao.mogo.module.left.panel.LeftPanelConst;
|
||||
import com.zhidao.mogo.tanlu.api.TanluApiConst;
|
||||
|
||||
import static com.mogo.module.guide.GuideConstant.PATH_GUIDE_FRAGMENT;
|
||||
import static com.mogo.module.guide.GuideConstant.PATH_GUIDE_MODULE_NAME;
|
||||
@@ -76,7 +75,7 @@ public class MogoApplication extends AbsMogoApplication {
|
||||
MogoModulePaths.addModule( new MogoModule( CallChatConstant.PROVIDER, CallChatConstant.MODULE_NAME ) );
|
||||
}
|
||||
|
||||
MogoModulePaths.addModule( new MogoModule( TanluApiConst.MODULE_PATH, TanluApiConst.MODULE_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_TANLU_API, "TanluApi" ) );
|
||||
MogoModulePaths.addBaseModule( new MogoModule( TanluConstants.TAG, TanluConstants.MODEL_NAME ) );
|
||||
MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_SHARE, "ShareControl" ) );
|
||||
|
||||
|
||||
@@ -88,7 +88,6 @@ targetSdkVersion : 22,
|
||||
|
||||
// modules
|
||||
moduletanlu : "com.mogo.module:module-tanlu:${MOGO_MODULE_TANLU_VERSION}",
|
||||
moduletanluapi : "com.mogo.module:module-tanlu-api:${MOGO_TANLU_API_VERSION}",
|
||||
moduleshare : "com.mogo.module:module-share:${MOGO_MODULE_SHARE_VERSION}",
|
||||
mogocommons : "com.mogo.commons:mogo-commons:${MOGO_COMMONS_VERSION}",
|
||||
mogoutils : "com.mogo.commons:mogo-utils:${MOGO_UTILS_VERSION}",
|
||||
|
||||
1
libraries/mogo-tanlu-api/.gitignore
vendored
1
libraries/mogo-tanlu-api/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,52 +0,0 @@
|
||||
apply plugin: 'com.android.library'
|
||||
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.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
compileOnly rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.tanluupload
|
||||
} else {
|
||||
compileOnly project(':modules:mogo-module-common')
|
||||
implementation project(':libraries:tanlulib')
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -1,3 +0,0 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-tanlu-api
|
||||
VERSION_CODE=1
|
||||
21
libraries/mogo-tanlu-api/proguard-rules.pro
vendored
21
libraries/mogo-tanlu-api/proguard-rules.pro
vendored
@@ -1,21 +0,0 @@
|
||||
# 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
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.zhidao.mogo.tanlu.api;
|
||||
|
||||
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.zhidao.mogo.tanlu.api.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.zhidao.mogo.tanlu.api">
|
||||
|
||||
/
|
||||
</manifest>
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.zhidao.mogo.tanlu.api;
|
||||
|
||||
/**
|
||||
* 探路api相关常量
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class TanluApiConst {
|
||||
public static final String MODULE_NAME = "MogoTanluApi";
|
||||
public static final String MODULE_PATH = "/tanlulib/api";
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.zhidao.mogo.tanlu.api;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,19 @@ apply plugin: 'android-aspectjx'
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion "29.0.2"
|
||||
|
||||
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'
|
||||
@@ -62,6 +67,9 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.aspectj
|
||||
implementation rootProject.ext.dependencies.analytics
|
||||
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
compileOnly rootProject.ext.dependencies.mogocommons
|
||||
compileOnly rootProject.ext.dependencies.mogomap
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.zhidao.mogo.tanlu.api;
|
||||
package com.zhidao.roadcondition;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.ArrayMap;
|
||||
@@ -13,15 +13,15 @@ import com.zhidao.roadcondition.service.UploadParams;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static com.zhidao.mogo.tanlu.api.TanluApiConst.MODULE_NAME;
|
||||
import static com.zhidao.mogo.tanlu.api.TanluApiConst.MODULE_PATH;
|
||||
import static com.zhidao.roadcondition.constant.ConstKt.API_MODULE_NAME;
|
||||
import static com.zhidao.roadcondition.constant.ConstKt.API_MODULE_PATH;
|
||||
|
||||
/**
|
||||
* 探路api
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
@Route(path = MODULE_PATH)
|
||||
@Route(path = API_MODULE_PATH)
|
||||
public class MogoTanluApiProvider implements IMogoTanluProvider {
|
||||
private Context context;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class MogoTanluApiProvider implements IMogoTanluProvider {
|
||||
@Override
|
||||
public void uploadRoadCondition(TanluUploadParams params) {
|
||||
if(params!=null) {
|
||||
Logger.d(MODULE_NAME, "uploadRoadCondition: " + params);
|
||||
Logger.d(API_MODULE_NAME, "uploadRoadCondition: " + params);
|
||||
Map<String, Object> properties = new ArrayMap<>();
|
||||
properties.put("type", params.getEventType());
|
||||
properties.put("from", params.getFromType());
|
||||
@@ -42,7 +42,7 @@ public class MogoTanluApiProvider implements IMogoTanluProvider {
|
||||
params.getFromType(), params.getDuration(), params.getParentId(),
|
||||
params.getLocation().lat, params.getLocation().lon));
|
||||
}else{
|
||||
Logger.e(MODULE_NAME,"params为空,无法上报情报");
|
||||
Logger.e(API_MODULE_NAME,"params为空,无法上报情报");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,12 +51,13 @@ public class MogoTanluApiProvider implements IMogoTanluProvider {
|
||||
*/
|
||||
@Override
|
||||
public void startTanluService() {
|
||||
Logger.d(MODULE_NAME, "startTanluService");
|
||||
Logger.d(API_MODULE_NAME, "startTanluService");
|
||||
MainService.Companion.launchService(context, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context = context;
|
||||
Logger.d(API_MODULE_NAME,"新TanluApi模块 init====");
|
||||
}
|
||||
}
|
||||
@@ -82,3 +82,6 @@ const val DEF_NEWS_LABEL = "拥堵"
|
||||
const val DEF_NEWS_VALUE = "traffic_jam"
|
||||
const val DEF_NEWS_TYPE = "0"
|
||||
|
||||
const val API_MODULE_NAME = "MogoTanluApi"
|
||||
const val API_MODULE_PATH = "/tanlulib/api"
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ include ':skin:mogo-skin-support-noop'
|
||||
include ':skin:mogo-skin-support'
|
||||
include ':modules:mogo-module-widgets'
|
||||
include ':modules:mogo-module-monitor'
|
||||
include ':libraries:mogo-tanlu-api'
|
||||
include ':foudations:mogo-base-services-apk'
|
||||
include ':foudations:mogo-base-services-sdk'
|
||||
include ':modules:mogo-module-splash-noop'
|
||||
|
||||
Reference in New Issue
Block a user