Skip to content

Commit

Permalink
MI | Removing bidan module and adding Gizi module #6
Browse files Browse the repository at this point in the history
Signed-off-by: mib-iqbal <[email protected]>
  • Loading branch information
mib-iqbal committed Nov 3, 2017
1 parent 82ce049 commit 514480e
Show file tree
Hide file tree
Showing 205 changed files with 35,849 additions and 1 deletion.
1 change: 1 addition & 0 deletions opensrp-gizi/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
138 changes: 138 additions & 0 deletions opensrp-gizi/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:1.2.3"
classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.1'
}
}

allprojects {
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
mavenLocal()
}
}

apply plugin: 'com.android.application'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'

android {
compileSdkVersion 23
buildToolsVersion "26.0.1"

defaultConfig {
applicationId "org.ei.opensrp.gizi"
minSdkVersion 18
targetSdkVersion 21
versionCode 1
versionName "1.0"
multiDexEnabled true
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "false"
resValue "string", 'opensrp_url', '"http://46.101.51.199:8181/opensrp"'
}

dexOptions {
incremental true
javaMaxHeapSize "4g"
}

lintOptions {
lintConfig file("lint.xml")
abortOnError false
}

buildTypes {
release {
minifyEnabled false
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

debug {
testCoverageEnabled true
}

}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'LICENSE.txt'
}

testOptions {
unitTests.returnDefaultValues = true
}

dexOptions {
incremental true
javaMaxHeapSize "4g"
}
}

dependencies {
compile('org.smartregister:opensrp-client-core:1.0.0-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.github.bmelnychuk', module: 'atv'
exclude group: 'com.google.guava', module: 'guava'
}
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:design:22.2.1'

compile 'com.jjoe64:graphview:4.0.1'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.android.support:appcompat-v7:22.2.1'
// compile project(':json2view')
compile 'com.google.guava:guava:20.0'

androidTestCompile 'junit:junit:4.12'

testCompile 'junit:junit:4.12'
testCompile 'org.apache.maven:maven-ant-tasks:2.1.3'
testCompile('com.squareup:fest-android:1.0.8') { exclude module: 'support-v4' }
testCompile 'org.robolectric:robolectric:3.4.2'
testCompile "org.robolectric:shadows-multidex:3.4-rc2"
// PowerMock
def powerMockVersion = '1.7.3'
testCompile "org.powermock:powermock-module-junit4:$powerMockVersion"
testCompile "org.powermock:powermock-module-junit4-rule:$powerMockVersion"
testCompile "org.powermock:powermock-api-mockito2:$powerMockVersion"
testCompile("org.powermock:powermock-classloading-xstream:$powerMockVersion")
}

task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebug']) {

reports {
xml.enabled = true
html.enabled = true
}

getReports().getXml().setDestination(file("${buildDir}/reports/jacoco/jacocoRootReport/merged.xml"))
getReports().getHtml().setDestination(file("${buildDir}/reports/jacoco/jacocoRootReport/html"))

def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*', '**/*$ViewBinder*.*']
def debugTree = fileTree(dir: "$project.buildDir/intermediates/classes/debug", excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"

sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: project.buildDir, includes: [
'jacoco/testDebug.exec', 'outputs/code-coverage/connected/*coverage.ec'
])
}

coveralls {
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/merged.xml"
}
Binary file added opensrp-gizi/libs/FlurryAnalytics-6.0.0.jar
Binary file not shown.
Binary file added opensrp-gizi/libs/sd-sdk-facial-processing.jar
Binary file not shown.
17 changes: 17 additions & 0 deletions opensrp-gizi/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /home/soran/Documents/android-sdk-linux/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.ei.opensrp.gizi;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
70 changes: 70 additions & 0 deletions opensrp-gizi/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.ei.opensrp.gizi">

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.VIBRATE"/>


<application android:allowBackup="true"
android:label="@string/app_name"
android:name="org.ei.opensrp.gizi.application.GiziApplication">
<!-- local key -->
<!-- <meta-data
android:name="io.fabric.ApiKey"
android:value="5bda8a6293b5b89b510a53e5d297d42bdf427e10" />
-->

<!-- sid key -->
<meta-data
android:name="io.fabric.ApiKey"
android:value="b74c58c94d8965151212e8ecf1f4fdfbf5b7f4e4" />

<activity
android:name="org.ei.opensrp.gizi.LoginActivity"
android:theme="@android:style/Theme.Holo"
android:windowSoftInputMode="adjustResize|stateHidden"
android:screenOrientation="landscape"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".GiziHomeActivity"
android:theme="@style/AppTheme"
android:screenOrientation="landscape"/>
<activity android:name="org.ei.opensrp.gizi.gizi.GiziSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".gizi.GiziDetailActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".gizi.GiziGrowthChartActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".gizi.GiziZScoreChartActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>
<activity android:name=".giziIbu.IbuSmartRegisterActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppThemeNoActionBarAndTitle"
android:windowSoftInputMode="adjustResize"
android:screenOrientation="landscape"/>


<activity android:name=".face.camera.SmartShutterActivity" android:noHistory="true" />
<activity android:name=".face.camera.ImageConfirmation" android:noHistory="true" />

<activity android:name=".face.camera.ClientsList" />

</application>

</manifest>
4 changes: 4 additions & 0 deletions opensrp-gizi/src/main/assets/app.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DRISHTI_BASE_URL=http://46.101.51.199:8080/oweb
PORT=8080
SHOULD_VERIFY_CERTIFICATE=false
SYNC_DOWNLOAD_BATCH_SIZE=100
28 changes: 28 additions & 0 deletions opensrp-gizi/src/main/assets/bindtypes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"bindobjects": [
{
"name": "bidan",
"columns": [
{"name":"bidanId"}
]
},
{
"name": "kartu_ibu",
"columns": [
{"name":"namalengkap"},{"name":"isOutOfArea"},{"name":"umur"},{"name":"namaSuami"},{"name":"noIbu"},{"name":"htp"}
]
},
{
"name": "ibu",
"columns": [
{"name":"kartuIbuId"},{"name":"type"},{"name":"ancDate"},{"name":"ancKe"},{"name":"hariKeKF"}
]
},
{
"name": "anak",
"columns": [
{"name":"ibuCaseId"},{"name":"namaBayi"},{"name":"tanggalLahirAnak"}
]
}
]
}
34 changes: 34 additions & 0 deletions opensrp-gizi/src/main/assets/ec_client_alerts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "alerts",
"columns": [{
"column_name": "caseID",
"json_mapping": {
"field": "baseEntityId"
}
}, {
"column_name": "scheduleName",
"json_mapping": {
"field": "data.scheduleName"
}
}, {
"column_name": "visitCode",
"json_mapping": {
"field": "data.visitCode"
}
}, {
"column_name": "status",
"json_mapping": {
"field": "data.alertStatus"
}
}, {
"column_name": "startDate",
"json_mapping": {
"field": "data.startDate"
}
}, {
"column_name": "expiryDate",
"json_mapping": {
"field": "data.expiryDate"
}
}]
}
Loading

0 comments on commit 514480e

Please sign in to comment.