皇甫睿欣 7 years ago
parent
commit
70b6878e73

+ 1 - 0
laraver-ui/.gitignore

1
+/build

+ 42 - 0
laraver-ui/build.gradle

1
+apply plugin: 'com.android.library'
2
+
3
+android {
4
+    compileSdkVersion 25
5
+
6
+
7
+
8
+    defaultConfig {
9
+        minSdkVersion 19
10
+        targetSdkVersion 25
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
+    compile fileTree(include: ['*.jar'], dir: 'libs')
29
+    compile 'com.android.support:appcompat-v7:25+'
30
+    testImplementation 'junit:junit:4.12'
31
+    androidTestImplementation 'com.android.support.test:runner:1.0.1'
32
+    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
33
+    //Banner依赖
34
+    compile 'com.bigkoo:convenientbanner:2.0.5'
35
+    compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.2.32@aar'
36
+
37
+    //RecyclerView依赖
38
+    compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.22'
39
+    //RecyclerView 分割线
40
+    compile 'com.choices.divider:RecyclerView_Divider:1.0.0'
41
+    implementation project(':laraver-core')
42
+}

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

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-ui/src/androidTest/java/com/kuxuan/laraver_ui/ExampleInstrumentedTest.java

1
+package com.kuxuan.laraver_ui;
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_ui.test", appContext.getPackageName());
25
+    }
26
+}

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

1
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+    package="com.kuxuan.laraver_ui" />

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

1
+<resources>
2
+    <string name="app_name">Laraver-ui</string>
3
+</resources>

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

1
+package com.kuxuan.laraver_ui;
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
+}