Browse Source

预约模块的分离

Arison 8 years ago
parent
commit
02ff5457b9

+ 1 - 0
app_modular/appbooking/.gitignore

@@ -0,0 +1 @@
+/build

+ 25 - 0
app_modular/appbooking/build.gradle

@@ -0,0 +1,25 @@
+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 rootProject.ext.android.versionCode
+        versionName rootProject.ext.android.versionName
+    }
+    buildTypes {
+        release {
+            minifyEnabled false
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+        }
+    }
+}
+
+dependencies {
+    compile fileTree(dir: 'libs', include: ['*.jar'])
+    compile deps.appcompatV7
+    testCompile deps.junit
+}

+ 25 - 0
app_modular/appbooking/proguard-rules.pro

@@ -0,0 +1,25 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Android\sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# 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

+ 26 - 0
app_modular/appbooking/src/androidTest/java/base/android/com/appbooking/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
+package base.android.com.appbooking;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation 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() throws Exception {
+        // Context of the app under test.
+        Context appContext = InstrumentationRegistry.getTargetContext();
+
+        assertEquals("base.android.com.appbooking.test", appContext.getPackageName());
+    }
+}

+ 2 - 0
app_modular/appbooking/src/main/AndroidManifest.xml

@@ -0,0 +1,2 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.modular.booking" />

+ 3 - 0
app_modular/appbooking/src/main/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">appbooking</string>
+</resources>

+ 17 - 0
app_modular/appbooking/src/test/java/base/android/com/appbooking/ExampleUnitTest.java

@@ -0,0 +1,17 @@
+package base.android.com.appbooking;
+
+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() throws Exception {
+        assertEquals(4, 2 + 2);
+    }
+}

+ 6 - 4
settings.gradle

@@ -1,18 +1,19 @@
 //主工程
-include ':WeiChat', ':appmessages'
+include ':WeiChat'
 
 //核心模块
 include ':network'
 include ':imageload'
 include ':common'
 include ':message'
-include ':appme'
-include ':appworks'
 
 //业务模块
+include  ':appmessages'
 include ':applogin'
 include ':appcontact'
-
+include  ':appbooking'
+include ':appme'
+include ':appworks'
 
 //第三库模块
 include ':lib-zxing'
@@ -39,6 +40,7 @@ project(':appme').projectDir = new File('app_modular/appme')
 project(':appworks').projectDir = new File('app_modular/appworks')
 project(':appcontact').projectDir = new File('app_modular/appcontact')
 project(':appmessages').projectDir = new File('app_modular/appmessages')
+project(':appbooking').projectDir = new File('app_modular/appbooking')
 
 //第三库模块
 project(':lib-zxing').projectDir = new File('app_third/lib-zxing')