Skip to content

Commit

Permalink
Update gradle version to 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rkodev committed Jul 27, 2020
1 parent 81a51ce commit fd06350
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 29 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildscript {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.3'
classpath 'io.fabric.tools:gradle:1.31.2'
Expand Down Expand Up @@ -62,11 +62,11 @@ subprojects {

group = 'org.smartregister'

ext.androidToolsBuildGradle = '28.0.3'
ext.androidBuildToolsVersion = '28.0.3'
ext.androidMinSdkVersion = 18
ext.androidCompileSdkVersion = 28
ext.androidTargetSdkVersion = 28
ext.androidToolsBuildGradle = '4.0.0'
ext.androidBuildToolsVersion = '29.0.3'
ext.androidMinSdkVersion = 18
ext.androidCompileSdkVersion = 28
ext.androidTargetSdkVersion = 28

ext.androidAnnotationsVersion = '3.0.1'
ext.androidAnnotationsAPIVersion = '3.0.1'
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Apr 27 09:47:15 EAT 2020
#Tue Jul 21 15:57:20 EAT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
14 changes: 8 additions & 6 deletions opensrp-chw/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
classpath 'io.fabric.tools:gradle:1.31.2'
}
Expand Down Expand Up @@ -106,7 +106,9 @@ android {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.md'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.md'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
Expand Down Expand Up @@ -256,7 +258,7 @@ android {
}

dependencies {
implementation('org.smartregister:opensrp-client-chw-core:1.3.2-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-chw-core:1.4.0-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'androidx.legacy', module: 'legacy-support-v4'
Expand Down Expand Up @@ -316,11 +318,11 @@ task jacocoTestReport(type: JacocoReport, dependsOn: [
def debugTree = fileTree(dir: "$project.buildDir/intermediates/javac/baDebug/classes/", excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"

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

tasks.withType(Test) {
Expand Down
10 changes: 5 additions & 5 deletions opensrp-chw/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ project.afterEvaluate {
group = "Reporting"
description = "Generate Jacoco coverage reports on the ${taskNameWithFlavor.capitalize()} build."

classDirectories = fileTree(
classDirectories.setFrom(fileTree(
dir: "${project.buildDir}/intermediates/classes/${pathNameWithFlavor}",
excludes: ['**/R.class',
'**/R$*.class',
Expand All @@ -45,16 +45,16 @@ project.afterEvaluate {
'**/*Module_*Factory.class',
'**/*$ViewInjector*.*',
'**/*$ViewBinder*.*'
])
]))

def coverageSourceDirs = [
"src/main/java",
"src/$productFlavorName/java",
"src/$buildType/java"
]
additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = fileTree(dir: project.projectDir, includes: ["**/*.exec", "**/*.ec"])
additionalSourceDirs.setFrom(files(coverageSourceDirs))
sourceDirectories.setFrom(files(coverageSourceDirs))
executionData.setFrom(fileTree(dir: project.projectDir, includes: ["**/*.exec", "**/*.ec"]))

reports {
xml.enabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.apache.commons.lang3.StringUtils;
import org.smartregister.chw.anc.domain.VisitDetail;
import org.smartregister.dao.AbstractDao;
import org.smartregister.domain.db.Event;
import org.smartregister.domain.Event;
import org.smartregister.domain.db.EventClient;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import org.smartregister.chw.util.JsonFormUtils;
import org.smartregister.chw.util.Utils;
import org.smartregister.domain.Photo;
import org.smartregister.domain.db.Client;
import org.smartregister.domain.Client;
import org.smartregister.family.util.DBConstants;
import org.smartregister.util.ImageUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.smartregister.chw.core.sync.CoreClientProcessor;
import org.smartregister.chw.core.utils.CoreConstants;
import org.smartregister.chw.schedulers.ChwScheduleTaskExecutor;
import org.smartregister.domain.db.Event;
import org.smartregister.domain.Event;
import org.smartregister.domain.db.EventClient;
import org.smartregister.domain.jsonmapping.ClientClassification;
import org.smartregister.domain.jsonmapping.Table;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public static String[] mainColumns(String tableName, String familyTable, String

public static ServiceTask createServiceTaskFromEvent(String taskType, String details, String title, String formSubmissionId) {
ServiceTask serviceTask = new ServiceTask();
org.smartregister.domain.db.Event event = ChildUtils.gsonConverter.fromJson(details, new TypeToken<org.smartregister.domain.db.Event>() {
org.smartregister.domain.Event event = ChildUtils.gsonConverter.fromJson(details, new TypeToken<org.smartregister.domain.Event>() {
}.getType());
List<org.smartregister.domain.db.Obs> observations = event.getObs();
for (org.smartregister.domain.db.Obs obs : observations) {
List<org.smartregister.domain.Obs> observations = event.getObs();
for (org.smartregister.domain.Obs obs : observations) {
if (obs.getFormSubmissionField().equalsIgnoreCase(formSubmissionId)) {
List<Object> hu = obs.getHumanReadableValues();
String value = "";
Expand All @@ -101,11 +101,11 @@ public static ServiceTask createServiceTaskFromEvent(String taskType, String det

public static ServiceTask createECDTaskFromEvent(Context context, String taskType, String details, String title) {
ServiceTask serviceTask = new ServiceTask();
org.smartregister.domain.db.Event event = ChildUtils.gsonConverter.fromJson(details, new TypeToken<org.smartregister.domain.db.Event>() {
org.smartregister.domain.Event event = ChildUtils.gsonConverter.fromJson(details, new TypeToken<org.smartregister.domain.Event>() {
}.getType());
List<org.smartregister.domain.db.Obs> observations = event.getObs();
List<org.smartregister.domain.Obs> observations = event.getObs();
String label = "";
for (org.smartregister.domain.db.Obs obs : observations) {
for (org.smartregister.domain.Obs obs : observations) {
if (obs.getFormSubmissionField().equalsIgnoreCase("develop_warning_signs")) {
List<Object> hu = obs.getHumanReadableValues();
String value = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.smartregister.chw.util.RepositoryUtilsFlv;
import org.smartregister.clientandeventmodel.Obs;
import org.smartregister.domain.db.Column;
import org.smartregister.domain.db.Event;
import org.smartregister.domain.Event;
import org.smartregister.domain.db.EventClient;
import org.smartregister.family.util.DBConstants;
import org.smartregister.immunization.repository.RecurringServiceRecordRepository;
Expand Down

0 comments on commit fd06350

Please sign in to comment.