Skip to content

Commit 0f40f23

Browse files
authored
Merge pull request #1959 from opensrp/all_sprints_and_keycloak_migration
All sprints and keycloak migration
2 parents 87eed43 + 4f1dca9 commit 0f40f23

File tree

122 files changed

+4557
-340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4557
-340
lines changed

build.gradle

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ allprojects {
5454
maven { url 'https://maven.fabric.io/public' }
5555
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
5656
maven { url 'https://nexus.pentaho.org/content/groups/omni/' }
57-
maven { url 'https://dl.bintray.com/ibm-watson-health/ibm-fhir-server-releases' }
57+
maven {
58+
url 'https://dl.bintray.com/ibm-watson-health/ibm-fhir-server-releases'
59+
content {
60+
// Does only include this group
61+
includeGroup "com.ibm.fhir"
62+
}
63+
}
5864
}
5965
}
6066

opensrp-chw/build.gradle

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ allprojects {
3939
}
4040
}
4141

42+
4243
apply plugin: 'com.android.application'
4344
apply plugin: 'jacoco'
4445
apply plugin: 'com.github.kt3k.coveralls'
@@ -61,8 +62,14 @@ android {
6162
checkReleaseBuilds false
6263
abortOnError false
6364
}
65+
defaultConfig {
66+
// Required when setting minSdkVersion to 20 or lower
67+
multiDexEnabled true
68+
}
6469

6570
compileOptions {
71+
coreLibraryDesugaringEnabled true
72+
6673
sourceCompatibility JavaVersion.VERSION_1_8
6774
targetCompatibility JavaVersion.VERSION_1_8
6875
}
@@ -157,6 +164,7 @@ android {
157164
buildConfigField "int", "STOCK_USAGE_REPORT_MINUTES", '1440'
158165
buildConfigField "boolean", "USE_UNIFIED_REFERRAL_APPROACH", "true"
159166
buildConfigField "boolean", "BUILD_FOR_BORESHA_AFYA_SOUTH", "false"
167+
buildConfigField "boolean", "LOG_CRASHLYTICS", "true"
160168
}
161169

162170
debug {
@@ -175,8 +183,14 @@ android {
175183
buildConfigField "int", "STOCK_USAGE_REPORT_MINUTES", '1440'
176184
buildConfigField "boolean", "USE_UNIFIED_REFERRAL_APPROACH", "true"
177185
buildConfigField "boolean", "BUILD_FOR_BORESHA_AFYA_SOUTH", "false"
186+
buildConfigField "boolean", "LOG_CRASHLYTICS", "false"
178187
testCoverageEnabled true
179188
}
189+
190+
preview {
191+
initWith debug
192+
buildConfigField "boolean", "LOG_CRASHLYTICS", "true"
193+
}
180194
}
181195

182196
packagingOptions {
@@ -203,6 +217,7 @@ android {
203217
returnDefaultValues = true
204218
includeAndroidResources = true
205219
}
220+
206221
unitTests.all {
207222
systemProperty 'robolectric.enabledSdks', '28'
208223
jvmArgs '-noverify'
@@ -329,16 +344,18 @@ android {
329344
dimension = 'baseDimension'
330345
applicationIdSuffix ".lmh"
331346
versionCode 2
332-
versionName "0.1.7"
347+
versionName "1.1.2"
348+
buildConfigField "int", "OPENMRS_UNIQUE_ID_INITIAL_BATCH_SIZE", '100000'
349+
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '50000'
333350
buildConfigField "String", 'opensrp_url', '"https://lmh-liberia.smartregister.org/opensrp/"'
334351
buildConfigField "String", 'guidebooks_url', '"https://opensrp.s3.amazonaws.com/media/lmh/"'
335-
buildConfigField "String", 'opensrp_url_debug', '"https://lmh-stage.smartregister.org/opensrp/"'
352+
buildConfigField "String", 'opensrp_url_debug', '"https://lmh-liberia-preview.smartregister.org/opensrp/"'
336353
buildConfigField "String[]", "LOCATION_HIERACHY", '{"Country" , "County" , "District", "Clinics", "CHSS", "Village","Commune"}'
337354
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS", '{"Country" , "County" , "District", "Clinics", "CHSS", "Village","Commune"}'
338-
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS_DEBUG", '{"Clinic" , "CHSS" , "CHA"}'
355+
buildConfigField "String[]", "ALLOWED_LOCATION_LEVELS_DEBUG", '{"Country" , "County" , "District", "Clinics", "CHSS", "Village","Commune"}'
339356
buildConfigField "String", 'DEFAULT_LOCATION', '"Commune"'
340-
buildConfigField "String", 'DEFAULT_LOCATION_DEBUG', '"CHA"'
341-
buildConfigField "int", "DATABASE_VERSION", '6'
357+
buildConfigField "String", 'DEFAULT_LOCATION_DEBUG', '"Commune"'
358+
buildConfigField "int", "DATABASE_VERSION", '7'
342359
}
343360
}
344361

@@ -348,7 +365,11 @@ android {
348365
}
349366

350367
dependencies {
351-
implementation('org.smartregister:opensrp-client-chw-core:2.1.3-SNAPSHOT@aar') {
368+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
369+
370+
implementation('com.google.android.gms:play-services-vision:17.0.2')
371+
372+
implementation('org.smartregister:opensrp-client-chw-core:2.1.4-LMH-Beta-04-SNAPSHOT@aar') {
352373
transitive = true
353374
exclude group: 'com.android.support', module: 'appcompat-v7'
354375
exclude group: 'androidx.legacy', module: 'legacy-support-v4'
@@ -379,6 +400,7 @@ dependencies {
379400
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
380401
androidTestImplementation 'org.mockito:mockito-android:3.0.0'
381402

403+
//implementation 'com.github.lecho:hellocharts-android:1.5.8@aar'
382404
//For viewing PDFs in the app
383405
implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
384406

@@ -391,6 +413,15 @@ dependencies {
391413
testImplementation 'org.robolectric:shadows-multidex:4.3.1'
392414
testImplementation 'org.robolectric:shadows-support-v4:3.4-rc2'
393415
testImplementation 'androidx.test:core:1.3.0'
416+
// testImplementation 'com.ibm.fhir:fhir-model:4.7.0'
417+
// testImplementation 'com.ibm.fhir:fhir-path:4.7.0'
418+
419+
// unit test
420+
def powerMockVersion = '2.0.7'
421+
testImplementation "org.powermock:powermock-module-junit4:$powerMockVersion"
422+
testImplementation "org.powermock:powermock-module-junit4-rule:$powerMockVersion"
423+
testImplementation "org.powermock:powermock-api-mockito2:$powerMockVersion"
424+
testImplementation "org.powermock:powermock-classloading-xstream:$powerMockVersion"
394425
}
395426

396427
def flavors = android.productFlavors.collect { flavor -> flavor.name }
@@ -430,6 +461,11 @@ task jacocoTestReport(type: JacocoReport, dependsOn: [
430461
tasks.withType(Test) {
431462
jacoco.includeNoLocationClasses = true
432463
maxHeapSize = "3g"
464+
465+
testLogging {
466+
events "failed"
467+
exceptionFormat "full"
468+
}
433469
}
434470

435471
tasks.coveralls {
@@ -439,4 +475,4 @@ tasks.coveralls {
439475
coveralls {
440476
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/merged.xml"
441477
sourceDirs = ["$project.projectDir/src/main/java"]
442-
}
478+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.smartregister.chw.custom_view;
2+
3+
public class FamilyFloatingMenuFlv extends DefaultFamilyFloatingMenuFlv {
4+
}

opensrp-chw/src/ba/java/org/smartregister/chw/custom_view/NavigationMenuFlv.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.apache.commons.lang3.tuple.Pair;
77
import org.smartregister.chw.core.activity.CoreStockInventoryReportActivity;
88
import org.smartregister.chw.core.activity.HIA2ReportsActivity;
9-
import org.smartregister.chw.core.custom_views.NavigationMenu;
109
import org.smartregister.chw.core.utils.CoreConstants;
1110
import org.smartregister.chw.referral.util.Constants;
1211

@@ -15,7 +14,7 @@
1514
import java.util.List;
1615
import java.util.Locale;
1716

18-
public class NavigationMenuFlv implements NavigationMenu.Flavour {
17+
public class NavigationMenuFlv extends DefaultNavigationMenuFlv {
1918

2019
@Override
2120
public List<Pair<String, Locale>> getSupportedLanguages() {

opensrp-chw/src/ba/java/org/smartregister/chw/interactor/PncHomeVisitInteractorFlv.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ protected void evaluateImmunization(Person baby) throws Exception {
759759
.withBaseEntityID(baby.getBaseEntityID())
760760
.withProcessingMode(BaseAncHomeVisitAction.ProcessingMode.SEPARATE)
761761
.withDestinationFragment(BaseHomeVisitImmunizationFragment.getInstance(view, baby.getBaseEntityID(), details, displays))
762-
.withHelper(new ImmunizationActionHelper(context, wrappers))
762+
.withHelper(new ImmunizationActionHelper(context, () -> wrappers))
763763
.build();
764764
actionList.put(MessageFormat.format(context.getString(R.string.pnc_immunization_at_birth), baby.getFullName()), action);
765765

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.smartregister.chw.custom_view;
2+
3+
public class FamilyFloatingMenuFlv extends DefaultFamilyFloatingMenuFlv {
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.smartregister.chw.custom_view;
2+
3+
public class FamilyFloatingMenuFlv extends DefaultFamilyFloatingMenuFlv {
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.smartregister.chw.custom_view;
2+
3+
public class FamilyFloatingMenuFlv extends DefaultFamilyFloatingMenuFlv {
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package org.smartregister.chw.custom_view;
2+
3+
public class FamilyFloatingMenuFlv extends DefaultFamilyFloatingMenuFlv {
4+
}

opensrp-chw/src/lmh/assets/json.form/child_enrollment.json

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"openmrs_entity_id": "first_name",
8888
"openmrs_data_type": "text",
8989
"type": "edit_text",
90+
"edit_type": "name",
9091
"hint": "{{child_enrollment.step1.first_name.hint}}",
9192
"expanded": false,
9293
"v_required": {
@@ -105,6 +106,7 @@
105106
"openmrs_entity_id": "middle_name",
106107
"openmrs_data_type": "text",
107108
"type": "edit_text",
109+
"edit_type": "name",
108110
"hint": "{{child_enrollment.step1.middle_name.hint}}",
109111
"expanded": false,
110112
"v_regex": {
@@ -206,11 +208,18 @@
206208
"openmrs_entity_parent": "",
207209
"openmrs_entity": "person",
208210
"openmrs_entity_id": "gender",
209-
"type": "spinner",
211+
"type": "native_radio",
210212
"hint": "{{child_enrollment.step1.gender.hint}}",
211-
"values": [
212-
"{{child_enrollment.step1.gender.values[0]}}",
213-
"{{child_enrollment.step1.gender.values[1]}}"
213+
"label": "{{child_enrollment.step1.gender.hint}}",
214+
"options": [
215+
{
216+
"key": "{{child_enrollment.step1.gender.values[0]}}",
217+
"text": "{{child_enrollment.step1.gender.values[0]}}"
218+
},
219+
{
220+
"key": "{{child_enrollment.step1.gender.values[1]}}",
221+
"text": "{{child_enrollment.step1.gender.values[1]}}"
222+
}
214223
],
215224
"v_required": {
216225
"value": "true",

0 commit comments

Comments
 (0)