Skip to content

Commit

Permalink
Merge pull request #871 from opensrp/migrate-crashlytics
Browse files Browse the repository at this point in the history
Upgrade Client Core Library
  • Loading branch information
ndegwamartin authored Nov 4, 2022
2 parents 602e44b + 3a6bf41 commit abbd694
Show file tree
Hide file tree
Showing 297 changed files with 3,969 additions and 4,853 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Print Java version
run: java -version
- name: Grant execute permission for gradlew
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@ jobs:
run: ./gradlew :opensrp-core:clean :opensrp-core:testDebugUnitTest --stacktrace

- name: Generate & upload library snapshot artifact AAR (Android Archive) file
run: ./gradlew :opensrp-core:uploadArchives -PmavenLocal=false --stacktrace
run: ./gradlew :opensrp-core:uploadArchives -PmavenLocal=false --stacktrace -PsonatypeUsername=${{ secrets.NEXUS_USERNAME }} -PsonatypePassword=${{ secrets.NEXUS_PASSWORD }}

- name: Github Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,4 @@ By placing a file named `app.properties` in your implementation assets folder (S
| `encrypt.shared.preferences` | Boolean | false | Enable/disables encrypting SharedPreferences |
| `allow.offline.login.with.invalid.token` | Boolean | false | Allow offline login when token is no longer valid after a successful login when online and user is forcefully logged out |
| `enable.search.button` | Boolean | false | Enable/Disable search to be triggered only after clicking the search icon in `org.smartregister.view.fragment.BaseRegisterFragment` or its subclass |
| `feature.profile.images.disabled` | Boolean | false | Disable profile image capturing and rendering |
22 changes: 11 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ buildscript {
google()
jcenter()
mavenCentral()
maven{ url "https://plugins.gradle.org/m2/" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.11.0"
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.10.2'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.30.0"
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0'
classpath 'org.smartregister:gradle-jarjar-plugin:1.0.0-SNAPSHOT'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
}
}

Expand All @@ -38,11 +38,11 @@ subprojects {

group = 'org.smartregister'

ext.androidToolsBuildGradle = '4.0.0'
ext.androidBuildToolsVersion = '29.0.3'
ext.androidMinSdkVersion = 18
ext.androidCompileSdkVersion = 29
ext.androidTargetSdkVersion = 29
ext.androidToolsBuildGradle = '4.2.2'
ext.androidBuildToolsVersion = '30.0.2'
ext.androidMinSdkVersion = 18
ext.androidCompileSdkVersion = 31
ext.androidTargetSdkVersion = 31

ext.androidAnnotationsVersion = '3.0.1'
ext.androidAnnotationsAPIVersion = '3.0.1'
Expand All @@ -52,7 +52,7 @@ subprojects {
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url "http://acra.googlecode.com/svn/repository/releases" }
maven { url "https://acra.googlecode.com/svn/repository/releases" }
maven { url "https://repo.maven.apache.org/maven2" }
maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=5.0.7-SNAPSHOT
VERSION_NAME=6.0.0-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Core Application
Expand All @@ -13,5 +13,5 @@ POM_SETTING_DEVELOPER_ID=opensrp
POM_SETTING_DEVELOPER_NAME=OpenSRP Onadev
android.useAndroidX=true
android.enableJetifier=true

org.gradle.jvmargs=-Xmx2048m
android.jetifier.ignorelist=shadows,bcprov-jdk15on
10 changes: 5 additions & 5 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#Wed Jun 24 12:56:07 EAT 2020
#Mon May 30 16:27:42 EAT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
org.gradle.daemon=true
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2048m
zipStoreBase=GRADLE_USER_HOME
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx2048m
153 changes: 68 additions & 85 deletions opensrp-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ description = 'OpenSRP core client library'
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$androidToolsBuildGradle"
classpath 'org.apache.commons:commons-lang3:3.10'
classpath 'io.fabric.tools:gradle:1.31.2'
classpath 'org.apache.commons:commons-lang3:3.12.0'
}
}

Expand All @@ -19,23 +17,21 @@ allprojects {
mavenLocal()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}

apply plugin: 'com.android.library'
//apply plugin: 'org.robolectric'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'maven-publish'

jacoco {
toolVersion = "0.8.5"
toolVersion = "0.8.8"
}

android {
compileSdkVersion androidCompileSdkVersion
buildToolsVersion androidBuildToolsVersion
useLibrary 'org.apache.http.legacy'

defaultPublishConfig !isReleaseBuild() ? "debug" : "release"

Expand All @@ -58,7 +54,7 @@ android {
debug {
minifyEnabled false
debuggable true
testCoverageEnabled = true
testCoverageEnabled = false
signingConfig signingConfigs.config
zipAlignEnabled true
buildConfigField "String", "TRUST_MANAGER_ALGORITHM", "\"X509\""
Expand Down Expand Up @@ -94,8 +90,9 @@ android {
testInstrumentationRunner "android.test.InstrumentationTestRunner"
buildConfigField "long", "BUILD_TIMESTAMP", System.currentTimeMillis() + "L"
buildConfigField "int", "DB_ENCRYPTION_VERSION", '1'
}

buildConfigField("int", "VERSION_CODE", "${defaultConfig.versionCode}")
buildConfigField("String", "VERSION_NAME", "\"${defaultConfig.versionName}\"")
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
Expand Down Expand Up @@ -161,25 +158,26 @@ afterEvaluate {
assembleDebug.dependsOn(copyTestResources)
}
configurations.all {
resolutionStrategy.force 'commons-codec:commons-codec:1.10'
resolutionStrategy.force 'commons-codec:commons-codec:1.15'
}

dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.5'
implementation 'net.zetetic:android-database-sqlcipher:4.2.0'

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.test:monitor:1.5.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
implementation 'net.zetetic:android-database-sqlcipher:4.5.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'org.codehaus.jackson:jackson-core-asl:1.9.13'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.3'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "org.apache.httpcomponents:httpmime:4.5.6"
implementation group: 'commons-codec', name: 'commons-codec', version: '1.10'
implementation group: 'com.google.guava', name: 'guava', version: '24.1-jre'
implementation group: 'commons-io', name: 'commons-io', version: '2.4'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.mozilla:rhino:1.7R4'
implementation 'com.ocpsoft:ocpsoft-pretty-time:1.0.7'
api 'joda-time:joda-time:2.10.5'
implementation group: 'commons-codec', name: 'commons-codec', version: '1.15'
implementation group: 'com.google.guava', name: 'guava', version: '31.1-android'
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation group: 'org.mozilla', name: 'rhino', version: '1.7.14'
implementation 'org.ocpsoft.prettytime:prettytime:5.0.6.Final'
api 'joda-time:joda-time:2.10.14'
implementation('com.github.bmelnychuk:atv:1.2.9') {
exclude group: 'com.google.android', module: 'android'
}
Expand All @@ -188,33 +186,32 @@ dependencies {
exclude group: 'com.google.android', module: 'android'
}

implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true
}

implementation('ch.acra:acra:4.5.0') {
implementation('ch.acra:acra:4.11.1') {
exclude group: 'org.json', module: 'json'
}

implementation 'com.github.ybq:Android-SpinKit:1.4.0'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.github.bumptech.glide:glide:4.13.0'

annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
annotationProcessor 'com.jakewharton:butterknife:10.2.3'

implementation fileTree(include: ['*.jar'], dir: 'libs')
annotationProcessor fileTree(include: ['butterknife*.jar'], dir: 'libs')

implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.security:security-crypto:1.0.0-rc03'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.security:security-crypto:1.0.0'

implementation('com.google.android.material:material:1.1.0') {
implementation('com.google.android.material:material:1.6.1') {
exclude group: 'com.android.support', module: 'recyclerview-v7'
}

implementation('com.evernote:android-job:1.2.6') {
implementation('com.evernote:android-job:1.4.3') {
exclude group: 'com.google.android', module: 'android'
}

implementation group: 'commons-validator', name: 'commons-validator', version: '1.6'
implementation group: 'commons-validator', name: 'commons-validator', version: '1.7'

implementation('de.hdodenhof:circleimageview:3.1.0') {
exclude group: 'com.google.android', module: 'android'
}
Expand All @@ -226,75 +223,61 @@ dependencies {
}

implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'

implementation 'org.smartregister:opensrp-client-utils:0.0.4-SNAPSHOT'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'

implementation 'org.smartregister:opensrp-plan-evaluator:1.6.6-SNAPSHOT'
implementation 'org.smartregister:opensrp-client-utils:0.0.6-SNAPSHOT'

implementation 'xerces:xercesImpl:2.12.0'
implementation 'org.smartregister:opensrp-plan-evaluator:1.6.7-SNAPSHOT'

implementation('ch.acra:acra:4.5.0') {
exclude group: 'org.json', module: 'json'
}
implementation 'xerces:xercesImpl:2.12.2'

implementation 'com.github.ybq:Android-SpinKit:1.2.0'
implementation 'com.mcxiaoke.volley:library:1.0.19'

implementation fileTree(include: ['*.jar'], dir: 'libs')
annotationProcessor fileTree(include: ['butterknife*.jar'], dir: 'libs')

implementation 'com.android.support:recyclerview-v7:28.0.0'

implementation('com.android.support:design:28.0.0') {
exclude group: 'com.android.support', module: 'recyclerview-v7'
}

implementation 'com.evernote:android-job:1.2.6'
implementation group: 'commons-validator', name: 'commons-validator', version: '1.6'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'xerces:xercesImpl:2.12.0'
compileOnly platform('com.google.firebase:firebase-bom:30.0.2')
compileOnly 'com.google.firebase:firebase-crashlytics'
compileOnly 'com.google.firebase:firebase-perf'

def work_version = "2.7.1"
implementation "androidx.work:work-runtime:$work_version"

// Add the dependency for the Performance Monitoring library
implementation 'com.google.firebase:firebase-perf:19.0.7'

implementation fileTree(include: ['*.jar'], dir: 'libs')

androidTestImplementation 'junit:junit:4.13'
//Mockito
def mockitoVersion = '4.6.1'
testImplementation("org.mockito:mockito-core:$mockitoVersion")
testImplementation("org.mockito:mockito-inline:$mockitoVersion")

testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
testImplementation 'org.mockito:mockito-core:3.1.0'
testImplementation "androidx.test:core:1.4.0"
testImplementation "androidx.test.ext:junit:1.1.2"
testImplementation "androidx.test:core:1.5.0-rc01"
testImplementation "androidx.test.ext:junit:1.1.4-rc01"

testAnnotationProcessor fileTree(include: ['butterknife*.jar'], dir: 'libs')
testAnnotationProcessor group: 'com.jakewharton', name: 'butterknife', version: '10.2.3'

testImplementation('org.robolectric:robolectric:4.3.1') {
//Robolectric
def robolectricVersion = '4.8.1'
testImplementation(group: 'org.robolectric', name: 'robolectric', version: "$robolectricVersion") {
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'org.apache.maven', module: 'maven-model'
exclude group: 'com.android.support'
exclude group: 'androidx.test'
exclude group: 'com.thoughtworks.xstream', module: 'xstream'
}

testImplementation('org.robolectric:shadows-multidex:4.3.1') {
testImplementation(group: 'org.robolectric', name: 'shadows-multidex', version: "$robolectricVersion") {
exclude group: 'com.google.guava', module: 'guava'
}

testRuntimeOnly platform('com.google.firebase:firebase-bom:30.0.2')
testRuntimeOnly 'com.google.firebase:firebase-crashlytics'
// Add the dependency for the Performance Monitoring library
testImplementation 'com.google.firebase:firebase-perf'

// PowerMock
def powerMockVersion = '2.0.4'
testImplementation "org.powermock:powermock-module-junit4:$powerMockVersion"
testImplementation "org.powermock:powermock-module-junit4-rule:$powerMockVersion"
testImplementation "org.powermock:powermock-module-javaagent:$powerMockVersion"
testImplementation "org.powermock:powermock-api-mockito2:$powerMockVersion"
testImplementation("org.powermock:powermock-classloading-xstream:$powerMockVersion")

def fragmentVersion = "1.2.5"
def powerMockVersion = '2.0.9'
testImplementation "org.powermock:powermock-core:$powerMockVersion"

def fragmentVersion = "1.5.4"
testImplementation "androidx.fragment:fragment-testing:$fragmentVersion"

testImplementation 'org.skyscreamer:jsonassert:1.5.1'
}

task clearJar(type: Delete) {
Expand All @@ -313,8 +296,8 @@ makeJar.dependsOn(clearJar, build)
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest']) {

reports {
xml.enabled = true
html.enabled = true
xml.required.set(true)
html.required.set(true)
}

getReports().getXml().setDestination(file("${buildDir}/reports/jacoco/jacocoRootReport/merged.xml"))
Expand All @@ -338,4 +321,4 @@ coveralls {
}

apply from: '../maven.gradle'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android'
2 changes: 1 addition & 1 deletion opensrp-core/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ POM_SETTING_PACKAGING=aar

android.useAndroidX=true
android.enableJetifier=true
android.jetifier.blacklist=shadows
android.jetifier.ignorelist=shadows
2 changes: 1 addition & 1 deletion opensrp-core/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Binary file removed opensrp-core/libs/butterknife-7.0.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed opensrp-core/libs/java-json.jar
Binary file not shown.
Loading

0 comments on commit abbd694

Please sign in to comment.