皇甫睿欣 лет назад: 6
Родитель
Сommit
39c8633c56

+ 4 - 6
app/build.gradle

@@ -19,10 +19,8 @@ android {
19 19
 }
20 20
 
21 21
 dependencies {
22
-    implementation fileTree(dir: 'libs', include: ['*.jar'])
23
-    implementation 'com.android.support:appcompat-v7:26.1.0'
24
-    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
25
-    testImplementation 'junit:junit:4.12'
26
-    androidTestImplementation 'com.android.support.test:runner:1.0.1'
27
-    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
22
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
23
+
24
+    api project(':laraver-browser')
25
+    annotationProcessor project(':laraver-compiler')
28 26
 }

+ 8 - 0
laraver-annotations/build.gradle

@@ -0,0 +1,8 @@
1
+apply plugin: 'java-library'
2
+
3
+dependencies {
4
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
5
+}
6
+
7
+sourceCompatibility = "1.7"
8
+targetCompatibility = "1.7"

+ 4 - 0
laraver-annotations/src/main/java/com/kuxuan/laraver_annotations/myClass.java

@@ -0,0 +1,4 @@
1
+package com.kuxuan.laraver_annotations;
2
+
3
+public class myClass {
4
+}

+ 1 - 0
laraver-browser/.gitignore

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

+ 31 - 0
laraver-browser/build.gradle

@@ -0,0 +1,31 @@
1
+apply plugin: 'com.android.library'
2
+
3
+android {
4
+    compileSdkVersion 26
5
+
6
+
7
+
8
+    defaultConfig {
9
+        minSdkVersion 25
10
+        targetSdkVersion 26
11
+        versionCode 1
12
+        versionName "1.0"
13
+
14
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15
+
16
+    }
17
+
18
+    buildTypes {
19
+        release {
20
+            minifyEnabled false
21
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22
+        }
23
+    }
24
+
25
+}
26
+
27
+dependencies {
28
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
29
+
30
+    api project(':laraver-core')
31
+}

+ 21 - 0
laraver-browser/proguard-rules.pro

@@ -0,0 +1,21 @@
1
+# Add project specific ProGuard rules here.
2
+# You can control the set of applied configuration files using the
3
+# proguardFiles setting in build.gradle.
4
+#
5
+# For more details, see
6
+#   http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+# If your project uses WebView with JS, uncomment the following
9
+# and specify the fully qualified class name to the JavaScript interface
10
+# class:
11
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+#   public *;
13
+#}
14
+
15
+# Uncomment this to preserve the line number information for
16
+# debugging stack traces.
17
+#-keepattributes SourceFile,LineNumberTable
18
+
19
+# If you keep the line number information, uncomment this to
20
+# hide the original source file name.
21
+#-renamesourcefileattribute SourceFile

+ 26 - 0
laraver-browser/src/androidTest/java/com/kuxuan/laraver/browser/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
1
+package com.kuxuan.laraver.browser;
2
+
3
+import android.content.Context;
4
+import android.support.test.InstrumentationRegistry;
5
+import android.support.test.runner.AndroidJUnit4;
6
+
7
+import org.junit.Test;
8
+import org.junit.runner.RunWith;
9
+
10
+import static org.junit.Assert.*;
11
+
12
+/**
13
+ * Instrumented test, which will execute on an Android device.
14
+ *
15
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16
+ */
17
+@RunWith(AndroidJUnit4.class)
18
+public class ExampleInstrumentedTest {
19
+    @Test
20
+    public void useAppContext() throws Exception {
21
+        // Context of the app under test.
22
+        Context appContext = InstrumentationRegistry.getTargetContext();
23
+
24
+        assertEquals("com.kuxuan.laraver.browser.test", appContext.getPackageName());
25
+    }
26
+}

+ 2 - 0
laraver-browser/src/main/AndroidManifest.xml

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

+ 3 - 0
laraver-browser/src/main/res/values/strings.xml

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

+ 17 - 0
laraver-browser/src/test/java/com/kuxuan/laraver/browser/ExampleUnitTest.java

@@ -0,0 +1,17 @@
1
+package com.kuxuan.laraver.browser;
2
+
3
+import org.junit.Test;
4
+
5
+import static org.junit.Assert.*;
6
+
7
+/**
8
+ * Example local unit test, which will execute on the development machine (host).
9
+ *
10
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11
+ */
12
+public class ExampleUnitTest {
13
+    @Test
14
+    public void addition_isCorrect() throws Exception {
15
+        assertEquals(4, 2 + 2);
16
+    }
17
+}

+ 8 - 0
laraver-compiler/build.gradle

@@ -0,0 +1,8 @@
1
+apply plugin: 'java-library'
2
+
3
+dependencies {
4
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
5
+}
6
+
7
+sourceCompatibility = "1.7"
8
+targetCompatibility = "1.7"

+ 4 - 0
laraver-compiler/src/main/java/com/kuxuan/laraver_compiler/myClass.java

@@ -0,0 +1,4 @@
1
+package com.kuxuan.laraver_compiler;
2
+
3
+public class myClass {
4
+}

+ 1 - 0
laraver-core/.gitignore

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

+ 35 - 0
laraver-core/build.gradle

@@ -0,0 +1,35 @@
1
+apply plugin: 'com.android.library'
2
+
3
+android {
4
+    compileSdkVersion 26
5
+
6
+
7
+
8
+    defaultConfig {
9
+        minSdkVersion 25
10
+        targetSdkVersion 26
11
+        versionCode 1
12
+        versionName "1.0"
13
+
14
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15
+
16
+    }
17
+
18
+    buildTypes {
19
+        release {
20
+            minifyEnabled false
21
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22
+        }
23
+    }
24
+
25
+}
26
+
27
+dependencies {
28
+    api fileTree(include: ['*.jar'], dir: 'libs')
29
+    api 'com.android.support:appcompat-v7:26.1.0'
30
+    testImplementation 'junit:junit:4.12'
31
+    androidTestImplementation 'com.android.support.test:runner:1.0.1'
32
+    api 'com.android.support.constraint:constraint-layout:1.0.2'
33
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
34
+    api project(':laraver-annotations')
35
+}

+ 21 - 0
laraver-core/proguard-rules.pro

@@ -0,0 +1,21 @@
1
+# Add project specific ProGuard rules here.
2
+# You can control the set of applied configuration files using the
3
+# proguardFiles setting in build.gradle.
4
+#
5
+# For more details, see
6
+#   http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+# If your project uses WebView with JS, uncomment the following
9
+# and specify the fully qualified class name to the JavaScript interface
10
+# class:
11
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+#   public *;
13
+#}
14
+
15
+# Uncomment this to preserve the line number information for
16
+# debugging stack traces.
17
+#-keepattributes SourceFile,LineNumberTable
18
+
19
+# If you keep the line number information, uncomment this to
20
+# hide the original source file name.
21
+#-renamesourcefileattribute SourceFile

+ 26 - 0
laraver-core/src/androidTest/java/com/kuxuan/laraver/ExampleInstrumentedTest.java

@@ -0,0 +1,26 @@
1
+package com.kuxuan.laraver;
2
+
3
+import android.content.Context;
4
+import android.support.test.InstrumentationRegistry;
5
+import android.support.test.runner.AndroidJUnit4;
6
+
7
+import org.junit.Test;
8
+import org.junit.runner.RunWith;
9
+
10
+import static org.junit.Assert.*;
11
+
12
+/**
13
+ * Instrumented test, which will execute on an Android device.
14
+ *
15
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16
+ */
17
+@RunWith(AndroidJUnit4.class)
18
+public class ExampleInstrumentedTest {
19
+    @Test
20
+    public void useAppContext() throws Exception {
21
+        // Context of the app under test.
22
+        Context appContext = InstrumentationRegistry.getTargetContext();
23
+
24
+        assertEquals("com.kuxuan.laraver.test", appContext.getPackageName());
25
+    }
26
+}

+ 2 - 0
laraver-core/src/main/AndroidManifest.xml

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

+ 3 - 0
laraver-core/src/main/res/values/strings.xml

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

+ 17 - 0
laraver-core/src/test/java/com/kuxuan/laraver/ExampleUnitTest.java

@@ -0,0 +1,17 @@
1
+package com.kuxuan.laraver;
2
+
3
+import org.junit.Test;
4
+
5
+import static org.junit.Assert.*;
6
+
7
+/**
8
+ * Example local unit test, which will execute on the development machine (host).
9
+ *
10
+ * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
11
+ */
12
+public class ExampleUnitTest {
13
+    @Test
14
+    public void addition_isCorrect() throws Exception {
15
+        assertEquals(4, 2 + 2);
16
+    }
17
+}

+ 1 - 1
settings.gradle

@@ -1 +1 @@
1
-include ':app'
1
+include ':app', ':laraver-annotations', ':laraver-compiler', ':laraver-core', ':laraver-browser'