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

Kujaku library dependency upgrade refactor #371

Merged
merged 59 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b2b4995
updating google location service dependency and removing unncessary m…
aurangzaibumer Apr 29, 2024
f19d418
update version number to publish artifact
aurangzaibumer Apr 29, 2024
7c66e27
Revert mapbox sdk key on gradle.properties
aurangzaibumer Apr 29, 2024
1f52503
removed unneccessary changes
aurangzaibumer Apr 29, 2024
a1a8398
removed developer-config file
aurangzaibumer Apr 29, 2024
c7bdcfe
Merge branch 'master' into updating-google-location-service
dubdabasoduba Apr 30, 2024
9307b0d
Update the utils and libs version
dubdabasoduba May 1, 2024
8c2bb76
:wrench: Remove unused file
dubdabasoduba May 1, 2024
4249ad8
:arrow_up: Update min sdk version
dubdabasoduba May 3, 2024
47f2adb
:arrow_up: Update the Kujaku dependencies
dubdabasoduba May 8, 2024
b5e3693
:arrow_up: Upgrade the kujaku dependencies and publish snapshots
dubdabasoduba May 9, 2024
1610f05
Update library.yml to JDK 17
ndegwamartin Jul 1, 2024
fe6cbe0
Update ci.yml to JDK 17
ndegwamartin Jul 1, 2024
0bb698a
Update utils.yml to JDK 17
ndegwamartin Jul 1, 2024
2a955ee
Merge pull request #370 from onaio/ndegwamartin-patch-1
ndegwamartin Jul 1, 2024
2547c2a
Pin CI workflow Runner to MacOS 13
ndegwamartin Jul 2, 2024
28edb1d
Upgrade Robolectric Version
ndegwamartin Jul 2, 2024
91b5ed7
Add missing Robolectric Artifact
ndegwamartin Jul 2, 2024
e55c20d
Run tests on API 30
ndegwamartin Jul 3, 2024
1e6049e
Update Run Instrumented Tests workflow configuration
ndegwamartin Jul 3, 2024
5302bc6
Update Run Instrumented Tests workflow configuration
ndegwamartin Jul 3, 2024
388f94e
Troubleshooting | Clean up
ndegwamartin Jul 25, 2024
763a74d
Migrate to API 13 (Android 12)
ndegwamartin Jul 25, 2024
3b82ab1
Fix build 💚
ndegwamartin Jul 26, 2024
a13ae14
Update workflow configuration 🔧
ndegwamartin Jul 26, 2024
01e91a9
Update Github workflow configurations 🔧
ndegwamartin Jul 29, 2024
4391225
Upgrade depdencies + Migration refactor ⬆️ ♻️
ndegwamartin Jul 29, 2024
c2afa01
Remove Deprecated namespace from AndroidManifest
ndegwamartin Jul 29, 2024
fd2d2fd
Update gradle configuration
ndegwamartin Jul 30, 2024
8c406b9
Update workflow
ndegwamartin Jul 30, 2024
0fc1fcb
Clean test
ndegwamartin Jul 30, 2024
1955005
Update workflow config
ndegwamartin Jul 30, 2024
55871e0
Update Workflow configuration 🔧
ndegwamartin Jul 30, 2024
b498ec0
Disable CI failing testcase
ndegwamartin Jul 30, 2024
d7efa4f
Resolve permission location for higher android builds.
Lentumunai-Mark Aug 9, 2024
7569358
Update Artifact Release Version for QA
ndegwamartin Aug 9, 2024
724ffbd
Update library.yml : Temporary Disable test for Artifacts
ndegwamartin Aug 12, 2024
0b56f7c
Update release version and undo finish activity.
Lentumunai-Mark Aug 13, 2024
c705b26
Merge pull request #373 from onaio/update-storage-permissions
ellykits Aug 14, 2024
a35cc73
:arrow_up: Update utils version
dubdabasoduba Aug 14, 2024
4ac8457
:arrow_up: Update the utils version on library
dubdabasoduba Aug 16, 2024
ca34a4c
:arrow_up: Upgrade kujaku to 0.10.5
dubdabasoduba Aug 16, 2024
03e75b6
:rewind: Revert publish mode on kujaku lib
dubdabasoduba Aug 16, 2024
b690e0c
Trigger CI
ndegwamartin Aug 19, 2024
921b00a
Update AVD configuration
ndegwamartin Aug 19, 2024
9bcb152
Update CI Workflow configuration 🔧
ndegwamartin Aug 19, 2024
4f9143e
Clean up
ndegwamartin Aug 19, 2024
6227405
Update storage permission configuration in library AndroidManifest.xml
ndegwamartin Aug 19, 2024
5658427
Update CI Workflow configuration 🔧
ndegwamartin Aug 19, 2024
5bdafb1
Disable failing tests
ndegwamartin Aug 19, 2024
7ffcc95
Clean up
ndegwamartin Aug 19, 2024
14dee49
Update cancel workflow action to latest version
ndegwamartin Aug 20, 2024
9bfc44c
Refactor GH workflow to cancel concurrent jobs natively
ndegwamartin Aug 20, 2024
c6a3559
Merge branch 'updating-google-location-service' into code-cov-refactor
ndegwamartin Sep 14, 2024
40d4118
Releases 0.10.6-SNAPSHOT
ndegwamartin Sep 14, 2024
38f160b
Remove redundant Robolectric deps download step
ndegwamartin Sep 14, 2024
85d598d
Upgrade Mapbox Turf dependency version
ndegwamartin Sep 14, 2024
7d869b6
Publish Kujaku ALPHA snapshot
ndegwamartin Sep 14, 2024
6f97d0e
0.10.6 Release
ndegwamartin Sep 18, 2024
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
79 changes: 62 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,87 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unit_tests:
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

runs-on: macos-latest
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [34]

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
java-version: 17

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Create local.properties file
run: touch local.properties && echo "mapbox.repo.token=${{ secrets.MAPBOX_SDK_REPO_TOKEN }}" >> local.properties

- name: Print Java version
run: java -version

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Git show commit count
run: git fetch origin master && git rev-list --first-parent --count origin/master
- name: Download Robolectric deps
run: chmod +x download-robolectric-deps.sh && ./download-robolectric-deps.sh
- name: Clean project
run: ./gradlew clean --stacktrace
- name: Build project skipping tests
run: ./gradlew build -x test --stacktrace
- name: Run Instrumented Tests manually

- name: Load AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}

- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 22
script: ./gradlew connectedDebug --stacktrace --info
- name: Run jacocoTestReport for each module
run: ./gradlew jacocoTestReport --stacktrace --info
api-level: ${{ matrix.api-level }}
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
force-avd-creation: true
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew clean connectedDebugAndroidTest --stacktrace

- name: Run unit tests for each module
run: ./gradlew testDebugUnitTest --stacktrace

- name: Generate jacocoTestReport for each module
run: ./gradlew jacocoTestReport --stacktrace

- name: Merge jacoco reports from all modules
run: ./gradlew jacocoFullReport --stacktrace

- name: Upload coverage to Coveralls with Gradle
run: ./gradlew coveralls --stacktrace
run: ./gradlew coveralls --stacktrace
28 changes: 7 additions & 21 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ jobs:
- name: Cancel previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
access_token: ${{ github.token }}

- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 2
uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
distribution: temurin
java-version: 17

- name: Create local.properties file
run: touch local.properties && echo "mapbox.repo.token=${{ secrets.MAPBOX_SDK_REPO_TOKEN }}" >> local.properties
Expand All @@ -45,25 +44,12 @@ jobs:

- name: Git show commit count
run: git fetch origin master && git rev-list --first-parent --count origin/master

- name: Download Robolectric deps
run: chmod +x download-robolectric-deps.sh && ./download-robolectric-deps.sh


- name: Clean project
run: ./gradlew clean --stacktrace

- name: Build project skipping tests
run: ./gradlew build -x test --stacktrace

- name: Run Instrumented Tests manually
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 22
script: ./gradlew :library:connectedDebug --stacktrace --info
run: ./gradlew clean --stacktrace

- name: Run unit tests with Gradle
run: ./gradlew :library:clean :library:testDebugUnitTest --stacktrace

- name: Generate & upload library snapshot artifact AAR (Android Archive) file
run: ./gradlew :library:clean --stacktrace && ./gradlew :library:assembleRelease --stacktrace && ./gradlew :library:publishMavenJavaPublicationToMavenCentralRepository --stacktrace

Expand All @@ -73,4 +59,4 @@ jobs:
- name: Github Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
27 changes: 7 additions & 20 deletions .github/workflows/utils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ jobs:
- name: Cancel previous workflow runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
access_token: ${{ github.token }}

- name: Checkout 🛎️
uses: actions/checkout@v2
with:
fetch-depth: 2
uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
distribution: temurin
java-version: 17

- name: Create local.properties file
run: touch local.properties && echo "mapbox.repo.token=${{ secrets.MAPBOX_SDK_REPO_TOKEN }}" >> local.properties
Expand All @@ -45,22 +44,10 @@ jobs:

- name: Git show commit count
run: git fetch origin master && git rev-list --first-parent --count origin/master

- name: Download Robolectric deps
run: chmod +x download-robolectric-deps.sh && ./download-robolectric-deps.sh


- name: Clean project
run: ./gradlew clean --stacktrace

- name: Build project skipping tests
run: ./gradlew build -x test --stacktrace

- name: Run Instrumented Tests manually
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 22
script: ./gradlew :utils:connectedDebug --stacktrace

- name: Generate & upload utils snapshot artifact AAR (Android Archive) file to Sonatype
run: ./gradlew :utils:clean --stacktrace && ./gradlew :utils:assembleRelease --stacktrace && ./gradlew :utils:publishMavenJavaPublicationToMavenCentralRepository --stacktrace

Expand All @@ -70,4 +57,4 @@ jobs:
- name: Github Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kujaku (Peacock) ![Build Status](https://github.com/onaio/kujaku/actions/workflows/ci.yml/badge.svg) ![Download](https://badgen.net/maven/v/maven-central/io.ona.kujaku/library) [![Coverage Status](https://coveralls.io/repos/github/onaio/kujaku/badge.svg)](https://coveralls.io/github/onaio/kujaku)

A mapping and check-in library for Android using **MapBox SDK (Version 8.3.3)**
A mapping and check-in library for Android using **MapBox SDK (Version 9.7.1)**

## IMPORTANT UPDATE

Expand Down
39 changes: 26 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()
maven{ url "https://plugins.gradle.org/m2/" }
}

dependencies {

classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.android.tools.build:gradle:8.4.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
classpath 'gradle.plugin.org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.12.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
//classpath 'com.palantir:jacoco-coverage:0.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -27,14 +25,15 @@ apply from: 'configs.gradle'
allprojects {
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()
maven { url "https://jitpack.io" }
maven { url "https://repository.liferay.com/nexus/content/repositories/public" }
maven {
url "https://dl.cloudsmith.io/public/terraframe/geoprism-registry/maven/"
}
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
url "https://api.mapbox.com/downloads/v2/releases/maven"
authentication {
basic(BasicAuthentication)
}
Expand All @@ -46,6 +45,8 @@ allprojects {
password = localProperties['mapbox.repo.token'] ?: ""
}
}
maven{url "https://oss.sonatype.org/content/repositories/snapshots"}
maven{url "https://s01.oss.sonatype.org/content/repositories/snapshots"}
}

}
Expand All @@ -58,14 +59,27 @@ task clean(type: Delete) {
apply plugin: 'java'

coveralls {
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoFullReport/jacocoFullReport.xml"
jacocoReportPath = layout.buildDirectory.dir("reports/jacoco/jacocoFullReport/jacocoFullReport.xml")
sourceDirs += ["utils/src/main/java"
, "library/src/main/java"
, "sample/src/main/java"
, "wrapper/src/main/java"]
}

task jacocoFullReport(type: JacocoReport, group: 'Coverage reports') {

mustRunAfter ":library:testDebugUnitTest"
mustRunAfter ":utils:testDebugUnitTest"
mustRunAfter ":sample:testDebugUnitTest"

mustRunAfter ":library:connectedDebugAndroidTest"
mustRunAfter ":utils:connectedDebugAndroidTest"
mustRunAfter ":sample:connectedDebugAndroidTest"

mustRunAfter ":library:jacocoTestReport"
mustRunAfter ":utils:jacocoTestReport"
mustRunAfter ":sample:jacocoTestReport"

description = 'Generates an aggregate report from all subprojects'

additionalSourceDirs.from = files(subprojects.sourceSets.main.allSource.srcDirs)
Expand Down Expand Up @@ -94,12 +108,11 @@ task jacocoFullReport(type: JacocoReport, group: 'Coverage reports') {
sourceDirectories.from = sourcePaths
classDirectories.from = classPaths

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

reports {
html.enabled true
xml.enabled true
xml.required.set(true)
html.required.set(true)
xml.outputLocation = layout.buildDirectory.file("reports/jacoco/jacocoFullReport/jacocoFullReport.xml")
html.outputLocation = layout.buildDirectory.dir("reports/jacoco/jacocoFullReport/html")
}

jacocoClasspath = files(jacocoClasspathPaths)
Expand Down
23 changes: 10 additions & 13 deletions configs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,31 +104,28 @@ ext {

// Dependency and other versions
androidxTestCoreVersion = "1.4.0"
buildToolsVersion = "30.0.3"
compileSdkVersion = 28
jacocoVersion = "0.8.8"
junitVersion = "4.12"
compileSdkVersion = 34
jacocoVersion = "0.8.11"
junitVersion = "4.13.2"
mapboxAnnotationPluginVersion = "0.9.0"
mapboxSdkVersion = "9.7.1"
robolectricShadowsMultidexVersion = "4.3.1"
robolectricVersion = "4.3.1"
mapboxSdkTurfVersion = "7.2.0"
robolectricShadowsMultidexVersion = "4.13"
robolectricVersion = "4.13"
supportVersion = "1.0.0"
volleyVersion = "1.2.0"
targetSdkVersion = 27
volleyVersion = "1.2.1"
targetSdkVersion = 34

// Dependency names
androidxTestCore = "androidx.test:core:$androidxTestCoreVersion"
junit = "junit:junit:$junitVersion"
mapboxSDK = "com.mapbox.mapboxsdk:mapbox-android-sdk:$mapboxSdkVersion"
mapboxSDKTurf = "com.mapbox.mapboxsdk:mapbox-sdk-turf:4.8.0"
mapboxSDKTurf = "com.mapbox.mapboxsdk:mapbox-sdk-turf:$mapboxSdkTurfVersion"
mapboxAnnotationPlugin = "com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:$mapboxAnnotationPluginVersion"
robolectric = "org.robolectric:robolectric:$robolectricVersion"
robolectricShadowsMultidex = "org.robolectric:shadows-multidex:$robolectricShadowsMultidexVersion"
}


//ext.mapboxSDK = "com.mapbox.maps:android:10.7.0"

ext.mapboxDependencies = { instance, configuration ->

configuration.implementation("com.mapbox.maps:android:$mapboxSdkVersion") {
Expand All @@ -142,7 +139,7 @@ ext.mapboxDependencies = { instance, configuration ->
// The local build has an issue fetching this library for some reason which
// is a dependency of the mapbox-android-sdk. The mapbox-sdk-turf is declared as
// a runtime dependency
configuration.implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:4.8.0'
configuration.implementation "com.mapbox.mapboxsdk:mapbox-sdk-turf:$instance.mapboxSdkTurfVersion"
configuration.implementation "com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v7:${instance.mapboxAnnotationPluginVersion}"

}
Expand Down
16 changes: 0 additions & 16 deletions download-robolectric-deps.sh

This file was deleted.

3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ POM_SETTING_DEVELOPER_ID=opensrp
POM_SETTING_DEVELOPER_NAME=OpenSRP Onadev
android.useAndroidX=true
android.enableJetifier=true
android.nonFinalResIds=false

android.jetifier.ignorelist=shadows,bcprov-jdk15on
android.jetifier.ignorelist=shadows,bcprov-jdk18on
#android.jetifier.blacklist=shadows,bcprov-jdk15on

# android.debug.obsoleteApi=true
Expand Down
Loading
Loading