This directory contains the Gradle build for the :openmedkit Android library.
OpenMedScanDemodemonstrates CameraX capture, on-device OCR, and highlighted identifier redaction.OpenMedMapleDemois the offline Maple Clinical Studio for PII redaction, entity extraction, relation extraction, and source-grounded reasoning/chat. It runs without model weights in synthetic preview mode and accepts a pinned, checksummed ONNX Runtime Mobile bundle for real on-device generation.
OpenMedKit Android is published from immutable OpenMed release tags through JitPack.
Add the repository in the consumer application's settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://jitpack.io")
content { includeGroup("com.github.maziyarpanahi") }
}
}
}Then add the v2.2.0 coordinate:
dependencies {
implementation("com.github.maziyarpanahi:openmed:v2.2.0")
}JitPack resolves the immutable v2.2.0 tag and publishes the openmedkit
Android release component as an AAR. Public consumers do not need GitHub
credentials. Use a commit coordinate only when intentionally testing an
unreleased build.
Install JDK 11 and Android SDK Platform 33, then run:
cd android
./gradlew testThe Android CI gate also builds the release AAR and measures offline library initialization (packaged catalog load plus downloader/cache setup):
cd android
./gradlew :openmedkit:verifyAndroidBudgets --continueReviewable ceilings live in gradle/budgets.properties. Measurements are
written to openmedkit/build/reports/budgets/ and published in the GitHub
Actions job summary. Budget increases should include an explicit review of the
packaged AAR or cold-start regression that requires the additional headroom.
Dependency resolution is limited to Google Maven, Maven Central, and the scoped
OpenMed group on JitPack. Dependency and plugin versions are declared in
gradle/libs.versions.toml; avoid hardcoding library versions in module build
files.
The library currently targets SDK 33 and sets minSdk to 26. Android 8.0 is the
baseline for on-device inference work because it preserves broad device support
while keeping runtime, storage, and execution APIs modern enough for the planned
local-first pipeline.
The OpenMedKit AAR includes consumer rules for its ONNX Runtime and DJL native bindings, service-loaded tokenizer providers, and model-catalog boundary. R8 and ProGuard apply these rules automatically when a consuming application enables shrinking or obfuscation; consumers do not need additional OpenMedKit keep rules.
The release packaging check builds the AAR and verifies that every rule from
openmedkit/consumer-rules.pro is present in its packaged proguard.txt:
cd android
./gradlew :openmedkit:verifyReleaseConsumerRulesJitPack is the public installation path documented above. The separate, optional
Maven Central path runs from .github/workflows/android-publish.yml on v* tags
or manual dispatch. Tag releases with Android artifact changes always assemble
the library and run its unit tests. They build and upload a signed Central Portal
bundle only when all signing and Sonatype credentials are configured; otherwise
the validated JitPack release remains the supported public artifact. Manual
dispatch always requires the credentials and runs the full publication path after
the explicit upload confirmation.
Repository secrets required only for Central Portal publication:
ANDROID_SIGNING_KEY: ASCII-armored GPG private key for artifact signing.ANDROID_SIGNING_KEY_PASSWORD: passphrase for the signing key.SONATYPE_USERNAME: Central Portal user-token username.SONATYPE_PASSWORD: Central Portal user-token password.