[OpenSRP] Migrate Engine to KMP#2949
Closed
FikriMilano wants to merge 3 commits intoohs-foundation:masterfrom
Closed
[OpenSRP] Migrate Engine to KMP#2949FikriMilano wants to merge 3 commits intoohs-foundation:masterfrom
FikriMilano wants to merge 3 commits intoohs-foundation:masterfrom
Conversation
Contributor
|
@FikriMilano Can you recreate this via your own fork instead of OpenSRP's? |
Member
Author
|
moved to personal fork |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2948
Description
Introduces
engine-kmp, a new Kotlin Multiplatform module that ports the FHIR Engine to run on Android, iOS, and Desktop, JS/Wasm.The migration replaces JVM-only dependencies (HAPI FHIR, Room Android, java.time, java.util.UUID, Timber, Gson) with multiplatform equivalents (kotlin-fhir, Room KMP, kotlinx-datetime, kotlin.uuid, Kermit, kotlinx-serialization).
What's done:
Create engine-kmp module
Core data model & interfaces
FhirEngine.kt— main interface with 12 suspend methods + search/count extensionsDatabase.kt— internal DB interfaceLocalChange.kt,FhirEngineConfiguration.kt,DateProvider.kt,ContentTypes.ktMoreResources.kt— resource type registry replacing JVM reflection (Class.forName()toKClass)Logging.kt— Kermit-based logging facade replacing TimberIndexing
StringIndex,DateIndex,DateTimeIndex,NumberIndex,QuantityIndex,TokenIndex,ReferenceIndex,UriIndex,PositionIndex)ResourceIndicescontainer with Builder patternResourceIndexer— indexes FHIR resources using kotlin-fhir'sFhirPathEngine.forR4()Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Migration
Screenshots (if applicable)
Checklist
./gradlew spotlessApplyand./gradlew spotlessCheckto check my code follows the style guide of this project../gradlew checkand./gradlew connectedCheckto test my changes locally.