|
@@ -1,30 +1,15 @@
|
1
|
|
-buildscript {
|
2
|
|
- repositories {
|
3
|
|
- jcenter()
|
4
|
|
- }
|
5
|
|
- dependencies {
|
6
|
|
- classpath 'com.android.tools.build:gradle:2.1.3'
|
7
|
|
- }
|
8
|
|
-}
|
9
|
|
-
|
10
|
1
|
apply plugin: 'com.android.library'
|
11
|
2
|
|
12
|
3
|
android {
|
13
|
4
|
compileSdkVersion 23
|
14
|
|
- buildToolsVersion "23.0.1"
|
|
5
|
+ buildToolsVersion "23.0.3"
|
15
|
6
|
|
16
|
7
|
defaultConfig {
|
17
|
8
|
minSdkVersion 16
|
18
|
|
- targetSdkVersion 22
|
|
9
|
+ targetSdkVersion 23
|
19
|
10
|
versionCode 1
|
20
|
11
|
versionName "1.0"
|
21
|
12
|
}
|
22
|
|
- defaultPublishConfig 'release'
|
23
|
|
- publishNonDefault true
|
24
|
|
- productFlavors {
|
25
|
|
- library {
|
26
|
|
- }
|
27
|
|
- }
|
28
|
13
|
buildTypes {
|
29
|
14
|
release {
|
30
|
15
|
minifyEnabled false
|
|
@@ -36,39 +21,43 @@ android {
|
36
|
21
|
lintOptions {
|
37
|
22
|
abortOnError false
|
38
|
23
|
}
|
39
|
|
-}
|
40
|
24
|
|
41
|
|
-repositories {
|
42
|
|
- mavenLocal()
|
43
|
|
- jcenter()
|
44
|
|
- maven {
|
45
|
|
- // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
46
|
|
- url "$rootDir/../node_modules/react-native/android"
|
47
|
|
- }
|
48
|
|
-}
|
49
|
|
-
|
50
|
|
-allprojects { p ->
|
51
|
|
- p.tasks.whenTaskAdded { task ->
|
52
|
|
- if (task.name.toLowerCase().contains('lint')) {
|
53
|
|
- task.enabled = false;
|
|
25
|
+ testOptions {
|
|
26
|
+ unitTests.all { t ->
|
|
27
|
+ reports {
|
|
28
|
+ html.enabled true
|
|
29
|
+ }
|
|
30
|
+ testLogging {
|
|
31
|
+ events "passed", "skipped", "failed", "standardOut", "standardError"
|
|
32
|
+ }
|
|
33
|
+ afterSuite { desc, result ->
|
|
34
|
+ if (!desc.parent) { // will match the outermost suite
|
|
35
|
+ def output = " ${result.resultType} (${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped) "
|
|
36
|
+ def repeatLength = output.length()
|
|
37
|
+ println '\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'
|
|
38
|
+
|
|
39
|
+ println "see report at file://${t.reports.html.destination}/index.html"
|
|
40
|
+ }
|
|
41
|
+ }
|
54
|
42
|
}
|
55
|
43
|
}
|
56
|
44
|
}
|
57
|
45
|
|
58
|
46
|
dependencies {
|
59
|
47
|
compile fileTree(dir: "libs", include: ["*.jar"])
|
60
|
|
- compile "com.aurelhubert:ahbottomnavigation:1.3.3"
|
|
48
|
+
|
61
|
49
|
compile "com.android.support:appcompat-v7:23.3.0"
|
62
|
50
|
compile 'com.android.support:design:23.3.0'
|
63
|
|
- compile "com.facebook.react:react-native:+" // From node_modules
|
|
51
|
+
|
|
52
|
+ // node_modules
|
|
53
|
+ compile "com.facebook.react:react-native:+"
|
|
54
|
+
|
|
55
|
+ // third party
|
|
56
|
+ compile "com.aurelhubert:ahbottomnavigation:1.3.3"
|
64
|
57
|
compile 'com.balysv.materialmenu:material-menu-toolbar:1.5.4'
|
65
|
58
|
|
|
59
|
+ // tests
|
66
|
60
|
testCompile "junit:junit:4.12"
|
67
|
61
|
testCompile "org.robolectric:robolectric:3.1.1"
|
68
|
62
|
testCompile 'org.assertj:assertj-core:3.5.2'
|
69
|
63
|
}
|
70
|
|
-
|
71
|
|
-task unit(dependsOn: 'testLibraryDebugUnitTest') << {
|
72
|
|
- println 'Finished running unit all tests'
|
73
|
|
- println 'report at file://' + tasks.testLibraryDebugUnitTest.outputs.files.last().absolutePath + '/index.html'
|
74
|
|
-}
|