Skip to content

Commit

Permalink
MI | Updating gradle and dependencies for nutritionist #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 08b5737 commit 82ce049
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 82 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ subprojects {
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "http://cloudant.github.io/cloudant-sync-eap/repository" }
maven {
url "${projectDir}/opensrp-bidan/../libs/"
url "${projectDir}/opensrp-gizi/../libs/"
}
maven {
url "${projectDir}/opensrp-bidan-it/../libs/"
url "${projectDir}/opensrp-gizi-it/../libs/"
}
mavenLocal()
}
Expand Down
114 changes: 34 additions & 80 deletions opensrp-bidan/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath "com.android.tools.build:gradle:1.2.3"
classpath 'org.apache.commons:commons-lang3:3.3.2'
classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'
classpath 'io.fabric.tools:gradle:1.+'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.1'
}
}

Expand All @@ -20,27 +17,23 @@ allprojects {
}

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

repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }

}

android {
compileSdkVersion 22
compileSdkVersion 23
buildToolsVersion "26.0.1"

defaultConfig {
applicationId "org.smartregister.bidan"
applicationId "org.ei.opensrp.gizi"
minSdkVersion 18
targetSdkVersion 21
versionCode 10
versionName "1.3.1"
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 {
Expand All @@ -50,32 +43,20 @@ android {

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

buildTypes {
release {
minifyEnabled false
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", 'opensrp_url', '""'
buildConfigField "int", "OPENMRS_UNIQUE_ID_INITIAL_BATCH_SIZE", '250'
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '100'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '1'
buildConfigField "int", "DATABASE_VERSION", '8'
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "true"
}

debug {
resValue "string", 'opensrp_url', '"http://46.101.51.199:8080/opensrp"'
buildConfigField "int", "OPENMRS_UNIQUE_ID_INITIAL_BATCH_SIZE", '250'
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '100'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "int", "DATABASE_VERSION", '8'
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "false"
testCoverageEnabled true
}

}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
Expand All @@ -91,73 +72,44 @@ android {
exclude 'LICENSE.txt'
}


testOptions {
unitTests.returnDefaultValues = true
}

dexOptions {
incremental true
javaMaxHeapSize "4g"
}
}

dependencies {
compile('org.smartregister:opensrp-client-native-form:1.0.2-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.android.support', module: 'recyclerview-v7'
}
compile('org.smartregister:opensrp-client-core:1.0.5-SNAPSHOT@aar') {
compile('org.smartregister:opensrp-client-core:1.0.0-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.github.bmelnychuk', module: 'atv'
}

compile('com.android.support:design:22.2.1') {
exclude group: 'com.android.support', module: 'recyclerview-v7'

}
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:leanback-v17:22.2.1'
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
compile 'com.jjoe64:graphview:4.2.1'
compile 'com.android.support:support-v4:22.2.1'
compile 'id.zelory:compressor:1.0.4'
compile 'com.twotoasters.SectionCursorAdapter:library:1.0.+'
compile 'com.github.ybq:Android-SpinKit:1.1.0'
compile 'junit:junit:4.12'

testCompile('org.robolectric:robolectric:3.4.2') {

exclude group: 'com.google.guava', module: 'guava'
exclude group: 'org.apache.maven', module: 'maven-model'
exclude group: 'org.apache.maven', module: 'maven-ant-tasks'
exclude group: 'com.android.support'
}
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:design:22.2.1'

testCompile("org.robolectric:shadows-multidex:3.4-rc2") {
exclude group: 'com.google.guava', module: 'guava'
}
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('com.android.support.test.espresso:espresso-core:2.+') {
androidTestCompile 'junit:junit:4.12'

exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'junit', module: 'junit'
}
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.1'
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") {

exclude group: 'com.thoughtworks.xstream', module: 'xstream'
}

testCompile 'org.apache.maven:maven-ant-tasks:2.1.3'
}

//Testing and coveralls

coveralls {
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/merged.xml"
testCompile("org.powermock:powermock-classloading-xstream:$powerMockVersion")
}

task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebug']) {
Expand All @@ -181,4 +133,6 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebug']) {
])
}

//End testing and coveralls
coveralls {
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/merged.xml"
}

0 comments on commit 82ce049

Please sign in to comment.