From a24b3e83ba8f193f6c58e1258a525d71a8a2201e Mon Sep 17 00:00:00 2001 From: tongchenfei Date: Tue, 2 Jun 2020 18:46:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 5 +- app/build.gradle | 70 ++++++++++++------- app/src/catholic/AndroidManifest.xml | 35 ++-------- app/src/d80x/AndroidManifest.xml | 63 ----------------- app/src/independent/AndroidManifest.xml | 29 ++++++++ app/src/launcher/AndroidManifest.xml | 28 ++++++++ app/src/main/AndroidManifest.xml | 47 +++---------- app/src/nwd/AndroidManifest.xml | 60 ---------------- config.gradle | 2 + gradle.properties | 3 + .../mogo-module-main-independent/.gitignore | 1 + .../mogo-module-main-independent/build.gradle | 50 +++++++++++++ .../consumer-rules.pro | 0 .../gradle.properties | 3 + .../proguard-rules.pro | 21 ++++++ .../independent/ExampleInstrumentedTest.java | 26 +++++++ .../src/main/AndroidManifest.xml | 34 +++++++++ .../independent/MainIndependentActivity.java | 23 ++++++ .../main/independent/ExampleUnitTest.java | 17 +++++ .../mogo-module-main-launcher/.gitignore | 1 + .../mogo-module-main-launcher/build.gradle | 50 +++++++++++++ .../consumer-rules.pro | 0 .../gradle.properties | 3 + .../proguard-rules.pro | 21 ++++++ .../launcher/ExampleInstrumentedTest.java | 26 +++++++ .../src/main}/AndroidManifest.xml | 28 +------- .../main/launcher/MainLauncherActivity.java | 19 +++++ .../module/main/launcher/ExampleUnitTest.java | 17 +++++ modules/mogo-module-main/build.gradle | 40 +++++------ .../com/mogo/module/main/MainActivity.java | 26 +++---- settings.gradle | 2 + 31 files changed, 473 insertions(+), 277 deletions(-) delete mode 100644 app/src/d80x/AndroidManifest.xml create mode 100644 app/src/independent/AndroidManifest.xml create mode 100644 app/src/launcher/AndroidManifest.xml delete mode 100644 app/src/nwd/AndroidManifest.xml create mode 100644 main-extensions/mogo-module-main-independent/.gitignore create mode 100644 main-extensions/mogo-module-main-independent/build.gradle create mode 100644 main-extensions/mogo-module-main-independent/consumer-rules.pro create mode 100644 main-extensions/mogo-module-main-independent/gradle.properties create mode 100644 main-extensions/mogo-module-main-independent/proguard-rules.pro create mode 100644 main-extensions/mogo-module-main-independent/src/androidTest/java/com/zhidao/mogo/module/main/independent/ExampleInstrumentedTest.java create mode 100644 main-extensions/mogo-module-main-independent/src/main/AndroidManifest.xml create mode 100644 main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java create mode 100644 main-extensions/mogo-module-main-independent/src/test/java/com/zhidao/mogo/module/main/independent/ExampleUnitTest.java create mode 100644 main-extensions/mogo-module-main-launcher/.gitignore create mode 100644 main-extensions/mogo-module-main-launcher/build.gradle create mode 100644 main-extensions/mogo-module-main-launcher/consumer-rules.pro create mode 100644 main-extensions/mogo-module-main-launcher/gradle.properties create mode 100644 main-extensions/mogo-module-main-launcher/proguard-rules.pro create mode 100644 main-extensions/mogo-module-main-launcher/src/androidTest/java/com/zhidao/mogo/module/main/launcher/ExampleInstrumentedTest.java rename {app/src/zhidao => main-extensions/mogo-module-main-launcher/src/main}/AndroidManifest.xml (62%) create mode 100644 main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java create mode 100644 main-extensions/mogo-module-main-launcher/src/test/java/com/zhidao/mogo/module/main/launcher/ExampleUnitTest.java diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 2c9f3703ae..6bde38ff56 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,6 +4,7 @@ diff --git a/app/build.gradle b/app/build.gradle index 99c5b45516..fb46431630 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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') diff --git a/app/src/catholic/AndroidManifest.xml b/app/src/catholic/AndroidManifest.xml index 8fe77ba4ff..ccd3059601 100644 --- a/app/src/catholic/AndroidManifest.xml +++ b/app/src/catholic/AndroidManifest.xml @@ -12,38 +12,11 @@ android:supportsRtl="true" android:theme="@style/AppTheme.App" tools:replace="android:label"> - - - - - - - - - - - - - + - + + + diff --git a/app/src/d80x/AndroidManifest.xml b/app/src/d80x/AndroidManifest.xml deleted file mode 100644 index 1096abd079..0000000000 --- a/app/src/d80x/AndroidManifest.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/independent/AndroidManifest.xml b/app/src/independent/AndroidManifest.xml new file mode 100644 index 0000000000..79962badfc --- /dev/null +++ b/app/src/independent/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/launcher/AndroidManifest.xml b/app/src/launcher/AndroidManifest.xml new file mode 100644 index 0000000000..80f278b7a4 --- /dev/null +++ b/app/src/launcher/AndroidManifest.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 31f31689d3..acc1e77d97 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -14,46 +14,15 @@ android:supportsRtl="true" android:theme="@style/AppTheme.App" tools:replace="android:label"> - - - - - - - - - - - - - - - - - + + + + + - + + + \ No newline at end of file diff --git a/app/src/nwd/AndroidManifest.xml b/app/src/nwd/AndroidManifest.xml deleted file mode 100644 index 357926ae40..0000000000 --- a/app/src/nwd/AndroidManifest.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/config.gradle b/config.gradle index 09aca032e8..69e6a49dee 100644 --- a/config.gradle +++ b/config.gradle @@ -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}", diff --git a/gradle.properties b/gradle.properties index c44c657668..2001ab0d94 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 + ## 工程外部模块 # 探路 diff --git a/main-extensions/mogo-module-main-independent/.gitignore b/main-extensions/mogo-module-main-independent/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/main-extensions/mogo-module-main-independent/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/main-extensions/mogo-module-main-independent/build.gradle b/main-extensions/mogo-module-main-independent/build.gradle new file mode 100644 index 0000000000..e2cf94d684 --- /dev/null +++ b/main-extensions/mogo-module-main-independent/build.gradle @@ -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() diff --git a/main-extensions/mogo-module-main-independent/consumer-rules.pro b/main-extensions/mogo-module-main-independent/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/main-extensions/mogo-module-main-independent/gradle.properties b/main-extensions/mogo-module-main-independent/gradle.properties new file mode 100644 index 0000000000..48aa348f9c --- /dev/null +++ b/main-extensions/mogo-module-main-independent/gradle.properties @@ -0,0 +1,3 @@ +GROUP=com.mogo.module +POM_ARTIFACT_ID=module-main-independent +VERSION_CODE=1 diff --git a/main-extensions/mogo-module-main-independent/proguard-rules.pro b/main-extensions/mogo-module-main-independent/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/main-extensions/mogo-module-main-independent/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/main-extensions/mogo-module-main-independent/src/androidTest/java/com/zhidao/mogo/module/main/independent/ExampleInstrumentedTest.java b/main-extensions/mogo-module-main-independent/src/androidTest/java/com/zhidao/mogo/module/main/independent/ExampleInstrumentedTest.java new file mode 100644 index 0000000000..0d481e0787 --- /dev/null +++ b/main-extensions/mogo-module-main-independent/src/androidTest/java/com/zhidao/mogo/module/main/independent/ExampleInstrumentedTest.java @@ -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 Testing documentation + */ +@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()); + } +} \ No newline at end of file diff --git a/main-extensions/mogo-module-main-independent/src/main/AndroidManifest.xml b/main-extensions/mogo-module-main-independent/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..fcfddb2b4a --- /dev/null +++ b/main-extensions/mogo-module-main-independent/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java b/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java new file mode 100644 index 0000000000..efd78c1938 --- /dev/null +++ b/main-extensions/mogo-module-main-independent/src/main/java/com/zhidao/mogo/module/main/independent/MainIndependentActivity.java @@ -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); + } +} diff --git a/main-extensions/mogo-module-main-independent/src/test/java/com/zhidao/mogo/module/main/independent/ExampleUnitTest.java b/main-extensions/mogo-module-main-independent/src/test/java/com/zhidao/mogo/module/main/independent/ExampleUnitTest.java new file mode 100644 index 0000000000..1d5940b5c0 --- /dev/null +++ b/main-extensions/mogo-module-main-independent/src/test/java/com/zhidao/mogo/module/main/independent/ExampleUnitTest.java @@ -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 Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/main-extensions/mogo-module-main-launcher/.gitignore b/main-extensions/mogo-module-main-launcher/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/main-extensions/mogo-module-main-launcher/build.gradle b/main-extensions/mogo-module-main-launcher/build.gradle new file mode 100644 index 0000000000..e2cf94d684 --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/build.gradle @@ -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() diff --git a/main-extensions/mogo-module-main-launcher/consumer-rules.pro b/main-extensions/mogo-module-main-launcher/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/main-extensions/mogo-module-main-launcher/gradle.properties b/main-extensions/mogo-module-main-launcher/gradle.properties new file mode 100644 index 0000000000..73da301072 --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/gradle.properties @@ -0,0 +1,3 @@ +GROUP=com.mogo.module +POM_ARTIFACT_ID=module-main-launcher +VERSION_CODE=1 diff --git a/main-extensions/mogo-module-main-launcher/proguard-rules.pro b/main-extensions/mogo-module-main-launcher/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/main-extensions/mogo-module-main-launcher/src/androidTest/java/com/zhidao/mogo/module/main/launcher/ExampleInstrumentedTest.java b/main-extensions/mogo-module-main-launcher/src/androidTest/java/com/zhidao/mogo/module/main/launcher/ExampleInstrumentedTest.java new file mode 100644 index 0000000000..6bccfd240a --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/src/androidTest/java/com/zhidao/mogo/module/main/launcher/ExampleInstrumentedTest.java @@ -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 Testing documentation + */ +@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()); + } +} \ No newline at end of file diff --git a/app/src/zhidao/AndroidManifest.xml b/main-extensions/mogo-module-main-launcher/src/main/AndroidManifest.xml similarity index 62% rename from app/src/zhidao/AndroidManifest.xml rename to main-extensions/mogo-module-main-launcher/src/main/AndroidManifest.xml index 31f31689d3..b59a0bf53e 100644 --- a/app/src/zhidao/AndroidManifest.xml +++ b/main-extensions/mogo-module-main-launcher/src/main/AndroidManifest.xml @@ -1,21 +1,9 @@ - + package="com.zhidao.mogo.module.main.launcher"> - - - + - - - - \ No newline at end of file diff --git a/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java b/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java new file mode 100644 index 0000000000..c7db9f79d3 --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/src/main/java/com/zhidao/mogo/module/main/launcher/MainLauncherActivity.java @@ -0,0 +1,19 @@ +package com.zhidao.mogo.module.main.launcher; + +import android.os.Bundle; + +import androidx.annotation.Nullable; + +import com.mogo.module.main.MainActivity; + +/** + * 针对作为Launcher的情况,做个性化操作 + * + * @author tongchenfei + */ +public class MainLauncherActivity extends MainActivity { + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } +} diff --git a/main-extensions/mogo-module-main-launcher/src/test/java/com/zhidao/mogo/module/main/launcher/ExampleUnitTest.java b/main-extensions/mogo-module-main-launcher/src/test/java/com/zhidao/mogo/module/main/launcher/ExampleUnitTest.java new file mode 100644 index 0000000000..2004abd04d --- /dev/null +++ b/main-extensions/mogo-module-main-launcher/src/test/java/com/zhidao/mogo/module/main/launcher/ExampleUnitTest.java @@ -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 Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/modules/mogo-module-main/build.gradle b/modules/mogo-module-main/build.gradle index 61422928c8..0bfcb0b4bd 100644 --- a/modules/mogo-module-main/build.gradle +++ b/modules/mogo-module-main/build.gradle @@ -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') } } diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java index f4b8d04f5a..9354765ddb 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java @@ -47,21 +47,21 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme IMogoLocationListener, IMogoMarkerClickListener { - private static final String TAG = "MainActivity"; + private 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; /** * 主模块管控定位,可以向各个模块发送统一定位信息 diff --git a/settings.gradle b/settings.gradle index 03d4c6868f..fe14af1bfd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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'