Merge branch 'dev_clean_flavor' into dev
This commit is contained in:
5
.idea/gradle.xml
generated
5
.idea/gradle.xml
generated
@@ -4,6 +4,7 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
@@ -18,6 +19,9 @@
|
||||
<option value="$PROJECT_DIR$/libraries/map-amap" />
|
||||
<option value="$PROJECT_DIR$/libraries/mogo-map" />
|
||||
<option value="$PROJECT_DIR$/libraries/mogo-map-api" />
|
||||
<option value="$PROJECT_DIR$/main-extensions" />
|
||||
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-independent" />
|
||||
<option value="$PROJECT_DIR$/main-extensions/mogo-module-main-launcher" />
|
||||
<option value="$PROJECT_DIR$/modules" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-apps" />
|
||||
<option value="$PROJECT_DIR$/modules/mogo-module-authorize" />
|
||||
@@ -39,7 +43,6 @@
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
||||
@@ -53,46 +53,64 @@ android {
|
||||
targetCompatibility 1.8
|
||||
}
|
||||
|
||||
flavorDimensions "product", "env"
|
||||
flavorDimensions "product","basic" , "env"
|
||||
|
||||
productFlavors {
|
||||
// 诺威达
|
||||
nwd {
|
||||
dimension "product"
|
||||
//独立app
|
||||
independent{
|
||||
dimension "basic"
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/nwd/AndroidManifest.xml'
|
||||
manifest.srcFile 'src/independent/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
applicationId rootProject.ext.android.applicationId
|
||||
}
|
||||
d80x {
|
||||
dimension "product"
|
||||
// launcher app
|
||||
launcher{
|
||||
dimension "basic"
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/d80x/AndroidManifest.xml'
|
||||
manifest.srcFile 'src/launcher/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
applicationId rootProject.ext.android.zhidadoApplicationId
|
||||
}
|
||||
zhidao {
|
||||
dimension "product"
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/zhidao/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
applicationId rootProject.ext.android.applicationId
|
||||
}
|
||||
// 诺威达
|
||||
// nwd {
|
||||
// dimension "product"
|
||||
// sourceSets {
|
||||
// main {
|
||||
// manifest.srcFile 'src/nwd/AndroidManifest.xml'
|
||||
// }
|
||||
// }
|
||||
// applicationId rootProject.ext.android.applicationId
|
||||
// }
|
||||
// d80x {
|
||||
// dimension "product"
|
||||
// sourceSets {
|
||||
// main {
|
||||
// manifest.srcFile 'src/d80x/AndroidManifest.xml'
|
||||
// }
|
||||
// }
|
||||
// applicationId rootProject.ext.android.zhidadoApplicationId
|
||||
// }
|
||||
// zhidao {
|
||||
// dimension "product"
|
||||
// sourceSets {
|
||||
// main {
|
||||
// manifest.srcFile 'src/zhidao/AndroidManifest.xml'
|
||||
// }
|
||||
// }
|
||||
// applicationId rootProject.ext.android.applicationId
|
||||
// }
|
||||
// 通用 APP
|
||||
catholic {
|
||||
dimension "product"
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'src/catholic/AndroidManifest.xml'
|
||||
}
|
||||
}
|
||||
applicationId rootProject.ext.android.applicationId
|
||||
}
|
||||
// f系列-分体机全系列,未细分
|
||||
f8xx{
|
||||
dimension "product"
|
||||
}
|
||||
qa {
|
||||
dimension "env"
|
||||
@@ -176,7 +194,8 @@ dependencies {
|
||||
}
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
api rootProject.ext.dependencies.modulemain
|
||||
launcherApi rootProject.ext.dependencies.modulemainlauncher
|
||||
independentApi rootProject.ext.dependencies.modulemainindependent
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.modulesearch
|
||||
@@ -186,7 +205,8 @@ dependencies {
|
||||
debugImplementation rootProject.ext.dependencies.gpssimulatordebug
|
||||
releaseImplementation rootProject.ext.dependencies.gpssimulatornoop
|
||||
} else {
|
||||
implementation project(':modules:mogo-module-main')
|
||||
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
|
||||
independentImplementation project(':main-extensions:mogo-module-main-independent')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-search')
|
||||
|
||||
@@ -12,38 +12,11 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<activity
|
||||
android:name="com.mogo.module.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data
|
||||
android:host="launcher"
|
||||
android:path="/main/switch2"
|
||||
android:scheme="mogo" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="a36b9f7b086fa3951bb35338a5a06dd3" />
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="com.amap.api.v2.apikey"-->
|
||||
<!-- android:value="a36b9f7b086fa3951bb35338a5a06dd3" />-->
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.mogo.launcher"
|
||||
android:sharedUserId="android.uid.system">
|
||||
|
||||
<application
|
||||
android:name=".MogoApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_shell_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
tools:replace="android:value"
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="40e2e7e773c7562b1f2b13699a93992c" />
|
||||
|
||||
<activity
|
||||
android:name="com.mogo.module.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<!--调试用,暂时开启LAUNCHER这个属性-->
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LAUNCHER_APP" />
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data
|
||||
android:host="launcher"
|
||||
android:path="/main/switch2"
|
||||
android:scheme="mogo" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="com.mogo.module.navi.cp.AddressContentProvider"
|
||||
android:authorities="com.zhidao.auto.personal.provider"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
</manifest>
|
||||
29
app/src/independent/AndroidManifest.xml
Normal file
29
app/src/independent/AndroidManifest.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.mogo.launcher">
|
||||
|
||||
<application
|
||||
android:name=".MogoApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_shell_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
tools:replace="android:value"
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="40e2e7e773c7562b1f2b13699a93992c" />
|
||||
<provider
|
||||
android:name="com.mogo.module.navi.cp.AddressContentProvider"
|
||||
android:authorities="com.zhidao.auto.personal.provider"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
</manifest>
|
||||
28
app/src/launcher/AndroidManifest.xml
Normal file
28
app/src/launcher/AndroidManifest.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.mogo.launcher">
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
<application
|
||||
android:name=".MogoApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_shell_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<provider
|
||||
android:name="com.mogo.module.navi.cp.AddressContentProvider"
|
||||
android:authorities="com.zhidao.auto.personal.provider"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="a36b9f7b086fa3951bb35338a5a06dd3" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -14,46 +14,15 @@
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<activity
|
||||
android:name="com.mogo.module.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<!--调试用,暂时开启LAUNCHER这个属性-->
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LAUNCHER_APP" />
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data
|
||||
android:host="launcher"
|
||||
android:path="/main/switch2"
|
||||
android:scheme="mogo" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<provider
|
||||
android:name="com.mogo.module.navi.cp.AddressContentProvider"
|
||||
android:authorities="com.zhidao.auto.personal.provider"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
<!-- <provider-->
|
||||
<!-- android:name="com.mogo.module.navi.cp.AddressContentProvider"-->
|
||||
<!-- android:authorities="com.zhidao.auto.personal.provider"-->
|
||||
<!-- android:enabled="true"-->
|
||||
<!-- android:exported="true" />-->
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="a36b9f7b086fa3951bb35338a5a06dd3" />
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="com.amap.api.v2.apikey"-->
|
||||
<!-- android:value="a36b9f7b086fa3951bb35338a5a06dd3" />-->
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.mogo.launcher"
|
||||
android:sharedUserId="android.uid.system">
|
||||
|
||||
<application
|
||||
android:name=".MogoApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_shell_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<activity
|
||||
android:name="com.mogo.module.main.MainActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<!--调试用,暂时开启LAUNCHER这个属性-->
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.LAUNCHER_APP" />
|
||||
<category android:name="android.intent.category.HOME" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data
|
||||
android:host="launcher"
|
||||
android:path="/main/switch2"
|
||||
android:scheme="mogo" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<provider
|
||||
android:name="com.mogo.module.navi.cp.AddressContentProvider"
|
||||
android:authorities="com.zhidao.auto.personal.provider"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="a36b9f7b086fa3951bb35338a5a06dd3" />
|
||||
</application>
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
</manifest>
|
||||
@@ -88,6 +88,8 @@ ext {
|
||||
mogomapapi : "com.mogo.map:mogo-map-api:${MOGO_MAP_API_VERSION}",
|
||||
modulecommon : "com.mogo.module:module-common:${MOGO_MODULE_COMMON_VERSION}",
|
||||
modulemain : "com.mogo.module:module-main:${MOGO_MODULE_MAIN_VERSION}",
|
||||
modulemainlauncher : "com.mogo.module:module-main-launcher:${MOGO_MODULE_MAIN_LAUNCHER_VERSION}",
|
||||
modulemainindependent : "com.mogo.module:module-main-independent:${MOGO_MODULE_MAIN_INDEPENDENT_VERSION}",
|
||||
modulemap : "com.mogo.module:module-map:${MOGO_MODULE_MAP_VERSION}",
|
||||
moduleservice : "com.mogo.module:module-service:${MOGO_MODULE_SERVICE_VERSION}",
|
||||
mogoservice : "com.mogo.service:mogo-service:${MOGO_SERVICE_VERSION}",
|
||||
|
||||
@@ -51,6 +51,9 @@ MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.1.0.15
|
||||
MOGO_MODULE_AUTHORIZE_VERSION=1.1.0.15
|
||||
MOGO_MODULE_GUIDE_VERSION=1.1.0.15
|
||||
|
||||
MOGO_MODULE_MAIN_LAUNCHER_VERSION = 1.0.0.0
|
||||
MOGO_MODULE_MAIN_INDEPENDENT_VERSION = 1.0.0.0
|
||||
|
||||
|
||||
## 工程外部模块
|
||||
# 探路
|
||||
|
||||
1
main-extensions/mogo-module-main-independent/.gitignore
vendored
Normal file
1
main-extensions/mogo-module-main-independent/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
50
main-extensions/mogo-module-main-independent/build.gradle
Normal file
50
main-extensions/mogo-module-main-independent/build.gradle
Normal file
@@ -0,0 +1,50 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
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")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.modulemain
|
||||
} else {
|
||||
implementation project(":modules:mogo-module-main")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-main-independent
|
||||
VERSION_CODE=1
|
||||
21
main-extensions/mogo-module-main-independent/proguard-rules.pro
vendored
Normal file
21
main-extensions/mogo-module-main-independent/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,26 @@
|
||||
package com.zhidao.mogo.module.main.independent;
|
||||
|
||||
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.module.main.independent.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.zhidao.mogo.module.main.independent">
|
||||
<application>
|
||||
<activity
|
||||
android:name=".MainIndependentActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:resizeableActivity="true"
|
||||
android:resumeWhilePausing="true"
|
||||
android:screenOrientation="landscape"
|
||||
android:stateNotNeeded="true"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/Main"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<data
|
||||
android:host="launcher"
|
||||
android:path="/main/switch2"
|
||||
android:scheme="mogo" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.zhidao.mogo.module.main.independent;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.module.main.MainActivity;
|
||||
|
||||
/**
|
||||
* 针对独立应用形式,做单独定制
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class MainIndependentActivity extends MainActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
mApps.setVisibility(View.GONE);
|
||||
mLeftShadowFrame.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.zhidao.mogo.module.main.independent;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
1
main-extensions/mogo-module-main-launcher/.gitignore
vendored
Normal file
1
main-extensions/mogo-module-main-launcher/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
50
main-extensions/mogo-module-main-launcher/build.gradle
Normal file
50
main-extensions/mogo-module-main-launcher/build.gradle
Normal file
@@ -0,0 +1,50 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
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")
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.modulemain
|
||||
} else {
|
||||
implementation project(":modules:mogo-module-main")
|
||||
}
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -0,0 +1,3 @@
|
||||
GROUP=com.mogo.module
|
||||
POM_ARTIFACT_ID=module-main-launcher
|
||||
VERSION_CODE=1
|
||||
21
main-extensions/mogo-module-main-launcher/proguard-rules.pro
vendored
Normal file
21
main-extensions/mogo-module-main-launcher/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,26 @@
|
||||
package com.zhidao.mogo.module.main.launcher;
|
||||
|
||||
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.module.main.launcher.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.mogo.launcher">
|
||||
package="com.zhidao.mogo.module.main.launcher">
|
||||
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
|
||||
<application
|
||||
android:name=".MogoApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_shell_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
tools:replace="android:label">
|
||||
<application>
|
||||
<activity
|
||||
android:name="com.mogo.module.main.MainActivity"
|
||||
android:name=".MainLauncherActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:enabled="true"
|
||||
@@ -45,15 +33,5 @@
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<provider
|
||||
android:name="com.mogo.module.navi.cp.AddressContentProvider"
|
||||
android:authorities="com.zhidao.auto.personal.provider"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
<!-- 高德地图 -->
|
||||
<meta-data
|
||||
android:name="com.amap.api.v2.apikey"
|
||||
android:value="a36b9f7b086fa3951bb35338a5a06dd3" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.zhidao.mogo.module.main.launcher;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.module.main.MainActivity;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* 针对作为Launcher的情况,做个性化操作
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class MainLauncherActivity extends MainActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Logger.d(TAG, "MainLauncherActivity onCreate()");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.zhidao.mogo.module.main.launcher;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -41,27 +41,27 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
implementation rootProject.ext.dependencies.mogoutils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.modulemap
|
||||
implementation rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.mogoservice
|
||||
implementation rootProject.ext.dependencies.moduleservice
|
||||
implementation rootProject.ext.dependencies.moduleapps
|
||||
implementation rootProject.ext.dependencies.mogoconnection
|
||||
implementation rootProject.ext.dependencies.moduleextensions
|
||||
api rootProject.ext.dependencies.mogoutils
|
||||
api rootProject.ext.dependencies.mogocommons
|
||||
api rootProject.ext.dependencies.modulecommon
|
||||
api rootProject.ext.dependencies.modulemap
|
||||
api rootProject.ext.dependencies.mogoserviceapi
|
||||
api rootProject.ext.dependencies.mogoservice
|
||||
api rootProject.ext.dependencies.moduleservice
|
||||
api rootProject.ext.dependencies.moduleapps
|
||||
api rootProject.ext.dependencies.mogoconnection
|
||||
api rootProject.ext.dependencies.moduleextensions
|
||||
} else {
|
||||
implementation project(":foudations:mogo-utils")
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-map')
|
||||
implementation project(':modules:mogo-module-service')
|
||||
implementation project(':services:mogo-service-api')
|
||||
implementation project(':services:mogo-service')
|
||||
implementation project(':modules:mogo-module-apps')
|
||||
implementation project(':foudations:mogo-connection')
|
||||
implementation project(':modules:mogo-module-extensions')
|
||||
api project(":foudations:mogo-utils")
|
||||
api project(":foudations:mogo-commons")
|
||||
api project(':modules:mogo-module-common')
|
||||
api project(':modules:mogo-module-map')
|
||||
api project(':modules:mogo-module-service')
|
||||
api project(':services:mogo-service-api')
|
||||
api project(':services:mogo-service')
|
||||
api project(':modules:mogo-module-apps')
|
||||
api project(':foudations:mogo-connection')
|
||||
api project(':modules:mogo-module-extensions')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,21 +47,21 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
IMogoLocationListener,
|
||||
IMogoMarkerClickListener {
|
||||
|
||||
private static final String TAG = "MainActivity";
|
||||
protected static final String TAG = MainActivity.class.getSimpleName();
|
||||
|
||||
private IMogoServiceApis mServiceApis;
|
||||
private IMogoMapService mMogoMapService;
|
||||
private IMogoMapUIController mMogoMapUIController;
|
||||
private MogoModulesHandler mMogoModuleHandler;
|
||||
private IMogoFragmentManager mMogoFragmentManager;
|
||||
private IMogoStatusManager mMogoStatusManager;
|
||||
protected IMogoServiceApis mServiceApis;
|
||||
protected IMogoMapService mMogoMapService;
|
||||
protected IMogoMapUIController mMogoMapUIController;
|
||||
protected MogoModulesHandler mMogoModuleHandler;
|
||||
protected IMogoFragmentManager mMogoFragmentManager;
|
||||
protected IMogoStatusManager mMogoStatusManager;
|
||||
|
||||
private View mHeader;
|
||||
private View mApps;
|
||||
private View mEntrance;
|
||||
private FrameLayout mFloatingLayout;
|
||||
private FrameLayout mCoverUpLayout;
|
||||
private View mLeftShadowFrame;
|
||||
protected View mHeader;
|
||||
protected View mApps;
|
||||
protected View mEntrance;
|
||||
protected FrameLayout mFloatingLayout;
|
||||
protected FrameLayout mCoverUpLayout;
|
||||
protected View mLeftShadowFrame;
|
||||
|
||||
/**
|
||||
* 主模块管控定位,可以向各个模块发送统一定位信息
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
include ':main-extensions:mogo-module-main-independent'
|
||||
include ':main-extensions:mogo-module-main-launcher'
|
||||
rootProject.name = 'MogoLauncher'
|
||||
include ':app'
|
||||
include ':foudations:mogo-utils'
|
||||
|
||||
Reference in New Issue
Block a user