Skip to content

Commit

Permalink
Merge branch 'master' into v1.2.0-moh_civ_uat
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
  • Loading branch information
inromualdo committed Jul 16, 2024
2 parents c71a0d7 + 97b9182 commit d044427
Show file tree
Hide file tree
Showing 78 changed files with 756 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
if: ${{ env.ANDROID_SECRETS_KEY }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3

- name: Set up Fastlane
if: ${{ env.ANDROID_SECRETS_KEY }}
Expand Down
83 changes: 82 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.3

- name: Set up Fastlane
run: gem install fastlane --no-document --quiet
Expand Down Expand Up @@ -444,6 +444,87 @@ jobs:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_MOH_TOGO_UAT }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_MOH_TOGO_UAT }}


- name: Unpack secrets moh_togo_echis
env:
ANDROID_SECRETS_KEY: ${{ secrets.ANDROID_SECRETS_KEY_MOH_TOGO_ECHIS }}
ANDROID_SECRETS_IV: ${{ secrets.ANDROID_SECRETS_IV_MOH_TOGO_ECHIS }}
run: make org=moh_togo_echis keydec

- name: Assemble moh_togo_echis
uses: maierj/[email protected]
with:
lane: build
options: '{ "flavor": "moh_togo_echis" }'
env:
ANDROID_KEYSTORE_PATH: moh_togo_echis.keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_MOH_TOGO_ECHIS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_MOH_TOGO_ECHIS }}

- name: Bundle moh_togo_echis
uses: maierj/[email protected]
with:
lane: bundle
options: '{ "flavor": "moh_togo_echis" }'
env:
ANDROID_KEYSTORE_PATH: moh_togo_echis.keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_MOH_TOGO_ECHIS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_MOH_TOGO_ECHIS }}


- name: Unpack secrets lumbini_ne
env:
ANDROID_SECRETS_KEY: ${{ secrets.ANDROID_SECRETS_KEY_LUMBINI_NE }}
ANDROID_SECRETS_IV: ${{ secrets.ANDROID_SECRETS_IV_LUMBINI_NE }}
run: make org=lumbini_ne keydec

- name: Assemble lumbini_ne
uses: maierj/[email protected]
with:
lane: build
options: '{ "flavor": "lumbini_ne" }'
env:
ANDROID_KEYSTORE_PATH: lumbini_ne.keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_LUMBINI_NE }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_LUMBINI_NE }}

- name: Bundle lumbini_ne
uses: maierj/[email protected]
with:
lane: bundle
options: '{ "flavor": "lumbini_ne" }'
env:
ANDROID_KEYSTORE_PATH: lumbini_ne.keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_LUMBINI_NE }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_LUMBINI_NE }}

- name: Unpack secrets gandaki_ne
env:
ANDROID_SECRETS_KEY: ${{ secrets.ANDROID_SECRETS_KEY_GANDAKI_NE }}
ANDROID_SECRETS_IV: ${{ secrets.ANDROID_SECRETS_IV_GANDAKI_NE }}
run: make org=gandaki_ne keydec

- name: Assemble gandaki_ne
uses: maierj/[email protected]
with:
lane: build
options: '{ "flavor": "gandaki_ne" }'
env:
ANDROID_KEYSTORE_PATH: gandaki_ne.keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_GANDAKI_NE }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_GANDAKI_NE }}

- name: Bundle gandaki_ne
uses: maierj/[email protected]
with:
lane: bundle
options: '{ "flavor": "gandaki_ne" }'
env:
ANDROID_KEYSTORE_PATH: gandaki_ne.keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD_GANDAKI_NE }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD_GANDAKI_NE }}


- name: GitHub release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
11 changes: 11 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sonar.sources=.
# Can have multiple comma-separated entries
sonar.exclusions=**/test*/**/*, **/androidTest*/**/*

sonar.tests=.
# Can have multiple comma-separated entries
sonar.test.inclusions=**/test*/**/*, **/androidTest*/**/*

sonar.issue.ignore.block=e1
sonar.issue.ignore.block.e1.beginBlockRegexp=NOSONAR_BEGIN
sonar.issue.ignore.block.e1.endBlockRegexp=NOSONAR_END
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,46 @@

# Release notes

## 1.4.0

### Technical Improvements

* Fix app crashing due to missing empty constructor in OpenSettingsDialogFragment ([#338](https://github.com/medic/cht-android/issues/338))
* Upgrade Ruby version from 2.7 to 3.3 for fastlane in build and publish files for GH actions ([#368](https://github.com/medic/cht-android/issues/368))

### Flavors

* Add apk for Gandaki, Nepal ([#367](https://github.com/medic/cht-android/pull/367))

## 1.3.0

### Improvements

* Add autoverify=true to AndroidManifest.xml file ([#353](https://github.com/medic/cht-android/pull/353))
* Add prominent disclosure on startup requesting user to link app and domain ([#353](https://github.com/medic/cht-android/pull/354))

### Technical Improvements

* Add sonar configuration ([#352](https://github.com/medic/cht-android/pull/352))

## 1.2.0

### Improvements

* Support Android 14 ([#349](https://github.com/medic/cht-android/pull/349))

### Flavors

* Add apk for cares malawi ([#334](https://github.com/medic/cht-android/pull/334))
* Generate Moh Togo UAT app bundle ([#339](https://github.com/medic/cht-android/pull/339))

### Technical Improvements

* Upgrade ruby version for fastlane ([#341](https://github.com/medic/cht-android/pull/341))
* Updated keystores for CARES APKs ([#342](https://github.com/medic/cht-android/pull/342))
* Fix e2e tests on CI ([#348](https://github.com/medic/cht-android/pull/348))
* Hardcode the values `ANDROID_KEY_ALIAS` and `ANDROID_KEYSTORE_PATH` in make command `check-env` ([#347](https://github.com/medic/cht-android/pull/347))

## 1.1.0

This release includes the following work:
Expand Down
40 changes: 30 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.0'
classpath 'com.android.tools.build:gradle:8.4.0'
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.8'
}
}
Expand Down Expand Up @@ -46,8 +46,10 @@ task pmd(type: Pmd) {
exclude '**/**.mp3'
exclude 'test/bash/bats/**'
dependencies {
pmd 'net.sourceforge.pmd:pmd-java:6.55.0'
pmd 'net.sourceforge.pmd:pmd-xml:6.55.0'
pmd 'net.sourceforge.pmd:pmd-cli:7.1.0'
pmd 'net.sourceforge.pmd:pmd-ant:7.1.0'
pmd 'net.sourceforge.pmd:pmd-java:7.1.0'
pmd 'net.sourceforge.pmd:pmd-xml:7.1.0'
}
}

Expand Down Expand Up @@ -106,13 +108,16 @@ android {
}
}

base {
archivesName = "${project.name}-${getVersionName()}"
}

defaultConfig {
//noinspection OldTargetApi
targetSdkVersion 34
minSdkVersion 21 // Android 5.0
versionCode getVersionCode()
versionName getVersionName()
archivesBaseName = "${project.name}-${versionName}"
//For espresso tests
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Test user credentials
Expand Down Expand Up @@ -414,6 +419,21 @@ android {
applicationId = 'org.medicmobile.webapp.mobile.moh_togo_uat'
}

moh_togo_echis {
dimension = 'brand'
applicationId = 'org.medicmobile.webapp.mobile.moh_togo_echis'
}

lumbini_ne {
dimension = 'brand'
applicationId = 'org.medicmobile.webapp.mobile.lumbini_ne'
}

gandaki_ne {
dimension = 'brand'
applicationId = 'org.medicmobile.webapp.mobile.gandaki_ne'
}

moh_civ_uat {
dimension = 'brand'
applicationId = 'org.medicmobile.webapp.mobile.moh_civ_uat'
Expand All @@ -438,16 +458,16 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.9.23')
implementation 'androidx.core:core:1.12.0'
implementation 'androidx.activity:activity:1.8.2'
implementation 'androidx.fragment:fragment:1.6.2'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.8.3'
implementation platform('org.jetbrains.kotlin:kotlin-bom:1.9.24')
implementation 'androidx.core:core:1.13.1'
implementation 'androidx.activity:activity:1.9.0'
implementation 'androidx.fragment:fragment:1.7.1'
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.8.5'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:5.2.0'
testImplementation 'com.google.android:android-test:4.1.1.4'
testImplementation 'org.robolectric:robolectric:4.11.1'
testImplementation 'org.robolectric:robolectric:4.12.1'
testImplementation 'androidx.test.espresso:espresso-core:3.5.1'
testImplementation 'androidx.test.espresso:espresso-intents:3.5.1'
testImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
3 changes: 1 addition & 2 deletions config/pmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
<exclude name="ImplicitSwitchFallThrough"/>
<exclude name="ConstructorCallsOverridableMethod"/>
<exclude name="NullAssignment"/>
<exclude name="DataflowAnomalyAnalysis"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="AssignmentInOperand"/>
<exclude name="BeanMembersShouldSerialize"/>
<exclude name="NonSerializableClass"/>
<exclude name="DoNotTerminateVM"/>
<exclude name="UseLocaleWithCaseConversions"/>
</rule>
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file added secrets/secrets-gandaki_ne.tar.gz.enc
Binary file not shown.
Binary file added secrets/secrets-lumbini_ne.tar.gz.enc
Binary file not shown.
Binary file added secrets/secrets-moh_togo_echis.tar.gz.enc
Binary file not shown.
Binary file added src/gandaki_ne/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions src/gandaki_ne/res/drawable/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
5 changes: 5 additions & 0 deletions src/gandaki_ne/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
5 changes: 5 additions & 0 deletions src/gandaki_ne/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file added src/gandaki_ne/res/mipmap-hdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/gandaki_ne/res/mipmap-mdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/gandaki_ne/res/mipmap-xhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/gandaki_ne/res/mipmap-xxhdpi/ic_launcher.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions src/gandaki_ne/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
Loading

0 comments on commit d044427

Please sign in to comment.