Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate tasking library #931

Open
wants to merge 24 commits into
base: dynamic-tasking
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
03b1513
Upgrade core library
githengi Jun 25, 2020
10ff4f4
Update plan status to use enum
githengi Jun 25, 2020
1850ed0
Update package for moved domains
githengi Jun 29, 2020
d45822b
Attemp to open family default if nothing is matched
githengi Jun 29, 2020
b81f129
Trigger plan evaluation
githengi Jun 29, 2020
81645fa
Evaluate plan plan when event is submitted
githengi Jun 30, 2020
f4eb19b
Upgrade family module
githengi Jun 30, 2020
fbb3cc8
Tag plan Identifier when event is being saved
githengi Jun 30, 2020
6c969b3
Bump up version
githengi Jun 30, 2020
7b041ac
Delete calls to generate tasks
githengi Jul 1, 2020
78aa7a0
Tag event with plan Identifier
githengi Jul 1, 2020
faa81fa
Remove task generation from utils
githengi Jul 1, 2020
9b1e56b
Code cleanup
githengi Jul 1, 2020
57c7fbb
Update unit tests
githengi Jul 1, 2020
f7b4723
Update broken unit tests
githengi Jul 1, 2020
792ae24
Update version
githengi Jul 3, 2020
99f9593
Merge branch 'master' into dynamic-tasking
githengi Jul 8, 2020
8ef2c80
Use jarjar to strip off unsed class using unsupported methodHandler.i…
githengi Jul 9, 2020
e2060da
Update broken unit test
githengi Jul 9, 2020
4f189f6
Integrate tasking lib into Reveal
ekigamba Aug 4, 2020
c605ace
Upgrade to client core 2.0.0-SNAPSHOT
ekigamba Aug 5, 2020
b7f0960
Override RevealJsonFormUtils#getFormJson to provide correct functiona…
ekigamba Aug 5, 2020
f9a1ac3
Finish dynamic tasking library integration
ekigamba Aug 10, 2020
03ddcb3
Remove duplicate classes already in the tasking library
ekigamba Aug 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 47 additions & 9 deletions opensrp-reveal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3'
classpath 'io.fabric.tools:gradle:1.31.2'
classpath 'org.smartregister:gradle-jarjar-plugin:1.0.0-SNAPSHOT'
}
}

Expand All @@ -25,6 +26,7 @@ apply plugin: 'com.android.application'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'io.fabric'
apply plugin: 'org.smartregister.gradle.jarjar'

jacoco {
toolVersion = "0.8.0"
Expand All @@ -45,8 +47,8 @@ android {
applicationId "org.smartregister.reveal"
minSdkVersion 18
targetSdkVersion 28
versionCode 21
versionName "4.0.1"
versionCode 22
versionName "5.0.0-RC1"
multiDexEnabled true
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "false"
Expand All @@ -58,6 +60,7 @@ android {
javaCompileOptions {
annotationProcessorOptions {
arguments = [eventBusIndex: 'org.smartregister.reveal.RevelEventBusIndex']
includeCompileClasspath = true
}
}

Expand All @@ -79,12 +82,29 @@ android {
println("Digital Globe config variables is not set in your local.properties")
buildConfigField "String", "DG_CONNECT_ID", "\"sample_key\""
}

if (properties != null && properties.containsKey("oauth.client.id")) {

buildConfigField "String", "OAUTH_CLIENT_ID", properties["oauth.client.id"]

} else {
project.logger.error("oauth.client.id variable is not set in your local.properties")
}

if (properties != null && properties.containsKey("oauth.client.secret")) {

buildConfigField "String", "OAUTH_CLIENT_SECRET", properties["oauth.client.secret"]

} else {
project.logger.error("oauth.client.secret variable is not set in your local.properties")
}
} else {
println("local.properties does not exist")
buildConfigField "String", "MAPBOX_SDK_ACCESS_TOKEN", "\"sample_key\""
buildConfigField "String", "DG_CONNECT_ID", "\"sample_key\""
}
}

dexOptions {
javaMaxHeapSize "4g"
}
Expand Down Expand Up @@ -123,11 +143,11 @@ android {
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '100'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "long", "SYNC_INTERVAL_IN_MINUTES", '15'
buildConfigField "org.smartregister.reveal.util.Country", "BUILD_COUNTRY", "org.smartregister.reveal.util.Country.THAILAND_EN"
buildConfigField "org.smartregister.reveal.util.Country", "BUILD_COUNTRY", "org.smartregister.reveal.util.Country.REFAPP"
buildConfigField "long", "PULL_UNIQUE_IDS_MINUTES", '15'
buildConfigField "String", "ADMIN_PASSWORD_NOT_NEAR_STRUCTURES", '"AdminPass1"'
buildConfigField "float", "MY_LOCATION_BUFFER", '25'
buildConfigField "boolean", "VALIDATE_FAR_STRUCTURES", 'true'
buildConfigField "boolean", "VALIDATE_FAR_STRUCTURES", 'false'
buildConfigField "int", "RESOLVE_LOCATION_TIMEOUT_IN_SECONDS", '60'
buildConfigField "boolean", "DISPLAY_OUTSIDE_OPERATIONAL_AREA_MASK", 'false'
buildConfigField "boolean", "DISPLAY_DISTANCE_SCALE", 'true'
Expand All @@ -141,6 +161,8 @@ android {
packagingOptions {
exclude 'META-INF/*'
exclude 'LICENSE.txt'
exclude("META-INF/*.kotlin_module")
exclude "META-INF/DEPENDENCIES"

}

Expand All @@ -167,7 +189,7 @@ dependencies {
exclude group: 'stax', module: 'stax-api'
}

implementation('org.smartregister:opensrp-client-core:1.13.0-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-core:2.0.0-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'com.android.support', module: 'appcompat-v7'
Expand All @@ -176,10 +198,10 @@ dependencies {
exclude group: 'com.github.ybq', module: 'Android-SpinKit'
exclude group: 'com.github.bmelnychuk', module: 'atv'
exclude group: 'com.google.android.gms', module: 'play-services-vision'
exclude group: 'com.ibm.fhir', module:'fhir-model'
exclude group: 'com.ibm.fhir', module: 'fhir-model'
}

testImplementation 'com.ibm.fhir:fhir-model:4.2.3'
jarJar 'com.ibm.fhir:fhir-model:4.2.3'

implementation('org.smartregister:opensrp-client-configurable-views:1.1.5-SNAPSHOT@aar') {
transitive = true
Expand Down Expand Up @@ -214,6 +236,13 @@ dependencies {
exclude group: 'com.android.support', module: 'appcompat-v7'
}

implementation ('org.smartregister:opensrp-client-tasking:0.0.3-SNAPSHOT') {
transitive = true
exclude group: 'org.smartregister', module: 'opensrp-client-core'
exclude group: 'com.ibm.fhir', module: 'fhir-model'
exclude group: 'io.ona.kujaku', module: 'library'
}

implementation 'com.google.android:flexbox:1.0.0'
implementation 'com.google.android.material:material:1.0.0'

Expand All @@ -226,8 +255,10 @@ dependencies {
implementation 'com.github.ybq:Android-SpinKit:1.2.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-scalebar-v8:0.3.0'

testImplementation 'junit:junit:4.12'
testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version: '2.2'
// Repackaged jars will be placed here, adding them to classpath
implementation fileTree(dir: "./build/libs", include: ['*.jar'])

testImplementation 'junit:junit:4.13'
testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
testImplementation('com.squareup:fest-android:1.0.8') { exclude module: 'support-v4' }
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.1.0'
Expand Down Expand Up @@ -280,3 +311,10 @@ task javadoc(type: Javadoc) {
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
}


jarJar {

// Dependencies and related JarJar rules
remove = ['fhir-model-4.2.3.jar': 'com.ibm.fhir.model.visitor.CopyingVisitor*']
}
13 changes: 4 additions & 9 deletions opensrp-reveal/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
</activity>

<activity
android:name=".view.FilterTasksActivity"
android:name="org.smartregister.tasking.activity.FilterTasksActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".view.TaskRegisterActivity"
android:name="org.smartregister.tasking.activity.TaskRegisterActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
Expand All @@ -105,13 +105,8 @@
android:launchMode="singleTask"
android:screenOrientation="portrait" />

<activity
android:name="org.smartregister.view.activity.DynamicJsonFormActivity"
android:launchMode="singleTask"
android:screenOrientation="portrait" />

<service android:name=".sync.LocationTaskIntentService" />
<service android:name=".sync.RevealSettingsSyncIntentService" />
<service android:name="org.smartregister.tasking.sync.LocationTaskIntentService" />
<service android:name="org.smartregister.tasking.sync.RevealSettingsSyncIntentService" />
<service android:name=".sync.RevealSyncIntentService" />
<service android:name="org.smartregister.sync.intent.PullUniqueIdsIntentService" />
<service android:name="org.smartregister.sync.intent.ValidateIntentService" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
import com.vijay.jsonwizard.constants.JsonFormConstants;

import org.smartregister.reveal.R;
import org.smartregister.reveal.contract.UserLocationContract.UserLocationView;
import org.smartregister.reveal.fragment.RevealJsonFormFragment;
import org.smartregister.tasking.contract.UserLocationContract;

import io.ona.kujaku.utils.Constants;

/**
* Created by samuelgithengi on 12/13/18.
*/
public class RevealJsonFormActivity extends FormConfigurationJsonFormActivity implements UserLocationView {
public class RevealJsonFormActivity extends FormConfigurationJsonFormActivity implements UserLocationContract.UserLocationView {

private RevealJsonFormFragment formFragment;

Expand Down

This file was deleted.

This file was deleted.

Loading