Skip to content

Fix/vaccine config missing file - #204

Open
josephtj wants to merge 20 commits into
opensrp:masterfrom
BlueCodeSystems:fix/vaccine-config-missing-file
Open

Fix/vaccine config missing file#204
josephtj wants to merge 20 commits into
opensrp:masterfrom
BlueCodeSystems:fix/vaccine-config-missing-file

Conversation

@josephtj

Copy link
Copy Markdown

No description provided.

AndreLesa and others added 20 commits September 25, 2025 12:26
Switch the root build to the current AGP/Gradle 8 toolchain and centralize repository/dependency management so the project can build with published artifacts only. The new setup configures nexus staging, uniform test JVM arguments, and removes obsolete pre-dex logic. Verified with ./gradlew test --no-daemon using JitPack dependencies.
Move the library gradle config to the AGP 8 style, drop the obsolete module properties file, and depend directly on the published OpenSRP artifacts. This keeps the module building when only remote coordinates are available and configures testing/publishing accordingly. Tests still run under the updated setup.
Add back the minimal resources and placeholder domain model that the published artifact expects so Robolectric views and dialog tests compile without PowerMock. This includes reinstating ids for entity/key tags, a default AppTheme, and the Photo metadata class used by image utilities. Without these shims the library fails to build when consumed via JitPack. Verified with ./gradlew test --no-daemon using JitPack dependencies.
Refactor the unit test suite to drop PowerMock usage in favor of Mockito static scopes and Robolectric utilities. This aligns the tests with the published library APIs (including ReflectionHelpers for singleton injection) and unblocks builds using binary dependencies. Verified with ./gradlew :opensrp-immunization:testDebugUnitTest --rerun-tasks.
Reconfigure the sample app to match the Gradle setup of sibling libraries. It now uses the published OpenSRP coordinates, modern AGP DSL, and restores missing theme/resources for Robolectric. This keeps the example building when only JitPack binaries are consumed. Ran ./gradlew test --no-daemon to verify.
Refresh the README to explain the library at a glance, document the supported toolchain, and provide installation, initialization, and usage examples. Added build/test guidance, contributing expectations, and sample app instructions while retaining the legacy walkthrough for reference.
Add META-INF LICENSE.md and NOTICE.md to the sample app's packaging
excludes so Gradle no longer fails when merging Java resources coming
from Jakarta JSON dependencies.

Test: ./gradlew clean assemble publishToMavenLocal
Alias any org.smartregister opensrp-client-core dependency to the
io.github.bluecodesystems coordinates and depend directly on
opensrp-plan-evaluator so we reuse its org.smartregister.domain.Photo
implementation. Drop the redundant local Photo model to eliminate the
multidex merge conflict.

Test: ./gradlew clean assemble publishToMavenLocal
Introduce a managed badges block at the top of the README so the latest
and master-SNAPSHOT builds are visibly linked from JitPack. The tag
badge is omitted intentionally because the repository has no tags yet.
Add a workflow that recalculates the managed JitPack badge block,
removes duplicate legacy badges, and pings JitPack after pushes or tag
creation. The job resolves the working branch before updating README so
future runs stay reproducible.
Prepare the 5.1.0 release by dropping the SNAPSHOT suffix and
documenting the accumulated changes across added features, fixes, build
updates, and CI improvements.
Upgrade the CI pipeline to the latest checkout/setup-java actions,
target Temurin JDK 17, and enable Gradle caching so the build matches
the supported toolchain for AGP 8.6.
Skip PGP signing by default in local CI builds unless
-PenableSigning=true and credentials are provided, preventing missing
.asc artifacts on environments without key material.
Cut the 5.1.1 release with README badge maintenance notes, the
signing-guard tweak, and updated CI documentation.
Call :opensrp-immunization:javaDocReleaseGeneration so the workflow no
longer fails with the ambiguous Gradle "javadoc" name.
…en't bundled

Checks asset existence before opening woman/mother vaccine config files
so a missing mother_vaccines.json (or similar) returns an empty list
instead of throwing a caught FileNotFoundException on every app init.

chore: bump version to 5.1.2 for JitPack release
… error

An app not bundling a config file for a vaccine category (e.g. no
mother_vaccines.json) is an expected, supported state, not a failure.
Downgrade the log from Timber.e to Timber.w so it's no longer surfaced
as a non-fatal exception in crash reporting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants