Fix debug mode detection and update eCHIS app configuration#3828
Fix debug mode detection and update eCHIS app configuration#3828roywanyaga wants to merge 1 commit intomainfrom
Conversation
- Fix debug mode detection in AppSettingViewModel and ConfigurationRegistry
- Check for /debug suffix directly in app ID instead of build variant
- Use case-insensitive matching for debug suffix
- Skip remote config fetch when using debug mode
- Update eCHIS flavor configuration
- Change app label from 'MOH UG eCHIS' to 'eCHIS' (shorter, won't truncate)
- Remove echisSupervisor product flavor (consolidated into single echis flavor)
- Add strings.xml for split screen name customization
- Add NDK version for 16KB page size support
- Set ndkVersion to 27.2.12479018 for Android 15+ compatibility
- Update dependencies
- Remove defunct OSSRH Maven repositories (sunset June 30, 2025)
- Change kujaku-library from 0.10.8-SNAPSHOT to 0.9.0 stable version
- Add unit tests
- Add 6 tests for AppSettingViewModel debug mode detection
- Add 7 tests for ConfigurationRegistry debug mode handling
- Test coverage for null/empty app IDs, case sensitivity, and whitespace trimming
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3828 +/- ##
=========================================
+ Coverage 25.0% 25.1% +0.1%
+ Complexity 844 842 -2
=========================================
Files 297 297
Lines 16102 15832 -270
Branches 2689 2631 -58
=========================================
- Hits 4038 3987 -51
+ Misses 11580 11368 -212
+ Partials 484 477 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| kt3k-coveralls-ver="2.12.0" | ||
| ktlint = "0.50.0" | ||
| kujaku-library = "0.10.8-SNAPSHOT" | ||
| kujaku-library = "0.9.0" |
There was a problem hiding this comment.
how big are the differences between 0.10.8 with 0.9.0?
There was a problem hiding this comment.
Not sure but 0.10.8 is not working.
There was a problem hiding this comment.
Looks like a downgrade. Are we able to trace where 0.10.8 was published from? We could republish an update from that
| maven(url = "https://oss.sonatype.org/content/repositories/snapshots") | ||
| maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots") | ||
| // Old OSSRH repos removed - service was sunset June 30, 2025 | ||
| // See: https://central.sonatype.org/pages/ossrh-eol/ |
There was a problem hiding this comment.
have you tested publishing some artifacts and make sure this url works?
| val appId = sharedPreferencesHelper.retrieveApplicationId()?.trim() | ||
| if (appId?.endsWith(DEBUG_SUFFIX, ignoreCase = true) == true) { | ||
| Timber.d("Skipping remote config fetch - app ID '$appId' has /debug suffix, using local assets") | ||
| return |
There was a problem hiding this comment.
Should we make this optional/configurable?
| kt3k-coveralls-ver="2.12.0" | ||
| ktlint = "0.50.0" | ||
| kujaku-library = "0.10.8-SNAPSHOT" | ||
| kujaku-library = "0.9.0" |
There was a problem hiding this comment.
Looks like a downgrade. Are we able to trace where 0.10.8 was published from? We could republish an update from that
| // Check directly for /debug suffix, regardless of build variant | ||
| appId.endsWith(ConfigurationRegistry.DEBUG_SUFFIX, ignoreCase = true) -> | ||
| loadConfigurations(context) |
There was a problem hiding this comment.
Should we make this optional?
|
@qiarie can you point the kujaku upgrade PR here. Should fix the issue with the downgrade. |
|
This PR is failing CI checks. @roywanyaga or @qiarie |
Fix debug mode detection in AppSettingViewModel and ConfigurationRegistry - Check for /debug suffix directly in app ID instead of build variant - Use case-insensitive matching for debug suffix - Skip remote config fetch when using debug mode
Update eCHIS flavor configuration
Add NDK version for 16KB page size support - Set ndkVersion to 27.2.12479018 for Android 15+ compatibility
Update dependencies
Add unit tests - Add 6 tests for AppSettingViewModel debug mode detection - Add 7 tests for ConfigurationRegistry debug mode handling - Test coverage for null/empty app IDs, case sensitivity, and whitespace trimming
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes [link to issue]
Engineer Checklist
strings.xmlfile./gradlew spotlessApplyand./gradlew spotlessCheckto check my code follows the project's style guideCode Reviewer Checklist
strings.xmlfile