@@ -6,8 +6,7 @@ buildscript {
6
6
jcenter()
7
7
}
8
8
dependencies {
9
- classpath " com.android.tools.build:gradle:3.1.2"
10
- classpath ' org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
9
+ classpath " com.android.tools.build:gradle:${ androidToolsBuildGradle} "
11
10
}
12
11
}
13
12
@@ -23,13 +22,20 @@ android {
23
22
compileSdkVersion androidCompileSdkVersion
24
23
buildToolsVersion androidBuildToolsVersion
25
24
25
+ defaultPublishConfig ! isReleaseBuild() ? " debug" : " release"
26
+
27
+ compileOptions {
28
+ sourceCompatibility JavaVersion . VERSION_1_8
29
+ targetCompatibility JavaVersion . VERSION_1_8
30
+ }
31
+
26
32
defaultConfig {
27
33
minSdkVersion androidMinSdkVersion
28
34
targetSdkVersion androidTargetSdkVersion
29
35
versionCode Integer . parseInt(project. VERSION_CODE )
30
36
versionName project. VERSION_NAME
31
37
multiDexEnabled true
32
- testInstrumentationRunner " android.support .test.runner.AndroidJUnitRunner"
38
+ testInstrumentationRunner " androidx .test.runner.AndroidJUnitRunner"
33
39
}
34
40
buildTypes {
35
41
release {
@@ -38,9 +44,11 @@ android {
38
44
buildConfigField " int" , " REPORT_INDICATOR_GENERATION_MINUTES" , ' 15'
39
45
}
40
46
debug {
47
+ testCoverageEnabled = true
41
48
buildConfigField " int" , " REPORT_INDICATOR_GENERATION_MINUTES" , ' 15'
42
49
}
43
50
}
51
+
44
52
dexOptions {
45
53
javaMaxHeapSize " 4g"
46
54
}
@@ -58,6 +66,8 @@ android {
58
66
exclude ' META-INF/NOTICE.txt'
59
67
exclude ' META-INF/notice.txt'
60
68
exclude ' META-INF/ASL2.0'
69
+ exclude ' META-INF/LICENSE.md'
70
+ exclude ' META-INF/NOTICE.md'
61
71
}
62
72
63
73
testOptions {
@@ -73,28 +83,25 @@ tasks.withType(Test) {
73
83
jacoco. includeNoLocationClasses = true
74
84
}
75
85
76
- allprojects {
77
- repositories {
78
- maven { url ' https://oss.sonatype.org/content/repositories/snapshots/' }
79
- maven { url " https://s3.amazonaws.com/repo.commonsware.com" }
80
- mavenLocal()
81
- }
82
- }
83
-
84
86
dependencies {
85
- implementation(' org.smartregister:opensrp-client-core:1.9.3 -SNAPSHOT@aar' ) {
87
+ implementation(' org.smartregister:opensrp-client-core:1.15.4 -SNAPSHOT@aar' ) {
86
88
transitive = true
87
89
exclude group : ' com.github.bmelnychuk' , module : ' atv'
88
90
exclude group : ' com.google.guava' , module : ' guava'
89
91
exclude group : ' com.android.support' , module : ' appcompat-v7'
92
+ exclude group : ' com.android.support' , module : ' design'
93
+ exclude group : ' com.android.support' , module : ' recyclerview-v7'
90
94
exclude group : ' org.apache.httpcomponents' , module : ' httpmime'
95
+ exclude group : ' com.ibm.fhir' , module : ' fhir-model'
91
96
}
92
97
93
- implementation ' com.android.support:appcompat-v7:28.0.0'
94
- implementation ' com.android.support:support-v4:28.0.0'
95
- implementation ' com.android.support:recyclerview-v7:28.0.0'
96
- implementation ' com.android.support:design:28.0.0'
97
- implementation ' com.android.support.constraint:constraint-layout:1.1.3'
98
+ compileOnly ' com.ibm.fhir:fhir-model:4.2.3'
99
+
100
+ implementation ' androidx.appcompat:appcompat:1.0.0'
101
+ implementation ' androidx.legacy:legacy-support-v4:1.0.0'
102
+ implementation ' androidx.recyclerview:recyclerview:1.0.0'
103
+ implementation ' com.google.android.material:material:1.0.0'
104
+ implementation ' androidx.constraintlayout:constraintlayout:1.1.3'
98
105
implementation ' com.github.lecho:hellocharts-library:1.5.8@aar'
99
106
100
107
implementation ' com.google.guava:guava:20.0'
@@ -113,13 +120,17 @@ dependencies {
113
120
testImplementation " org.powermock:powermock-api-mockito2:$powerMockVersion "
114
121
testImplementation " org.powermock:powermock-classloading-xstream:$powerMockVersion "
115
122
testImplementation ' org.skyscreamer:jsonassert:1.5.0'
116
- androidTestImplementation ' com.android.support. test:runner :1.0.2 '
117
- androidTestImplementation ' com.android.support. test.espresso:espresso-core:3.0.2 '
123
+ androidTestImplementation ' androidx. test.ext:junit :1.1.1 '
124
+ androidTestImplementation ' androidx. test.espresso:espresso-core:3.1.0 '
118
125
119
126
implementation group : ' org.yaml' , name : ' snakeyaml' , version : ' 1.23'
120
127
121
128
}
122
129
130
+ tasks. coveralls {
131
+ dependsOn ' jacocoTestReport'
132
+ }
133
+
123
134
task jacocoTestReport (type : JacocoReport , dependsOn : [' testDebugUnitTest' ]) {
124
135
125
136
reports {
@@ -131,18 +142,19 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {
131
142
getReports(). getHtml(). setDestination(file(" ${ buildDir} /reports/jacoco/jacocoRootReport/html" ))
132
143
133
144
def fileFilter = [' **/R.class' , ' **/R$*.class' , ' **/BuildConfig.*' , ' **/Manifest*.*' , ' **/*Test*.*' , ' android/**/*.*' , ' **/*$ViewBinder*.*' ]
134
- def debugTree = fileTree(dir : " $project . buildDir /intermediates/classes /debug" , excludes : fileFilter)
145
+ def debugTree = fileTree(dir : " $project . buildDir /intermediates/javac /debug/classes " , excludes : fileFilter)
135
146
def mainSrc = " $project . projectDir /src/main/java"
136
147
137
- sourceDirectories = files([mainSrc])
138
- classDirectories = files([debugTree])
139
- executionData = fileTree(dir : project. buildDir, includes : [
148
+ sourceDirectories. setFrom( files([mainSrc]) )
149
+ classDirectories. setFrom( files([debugTree]) )
150
+ executionData. setFrom( fileTree(dir : project. buildDir, includes : [
140
151
' jacoco/testDebugUnitTest.exec' , ' outputs/code-coverage/connected/*coverage.ec'
141
- ])
152
+ ]))
142
153
}
143
154
144
155
coveralls {
145
156
jacocoReportPath = " ${ buildDir} /reports/jacoco/jacocoRootReport/merged.xml"
157
+ sourceDirs = [" $project . projectDir /src/main/java" ]
146
158
}
147
159
148
160
apply from : ' ../maven.gradle'
0 commit comments