Module Structure
The Android artifacts you add, the ones they pull in, and the Gradle plugin
You add up to three Android artifacts: dari for debug builds, dari-noop for release, and dari-core for shared code. dari pulls in two more, dari-runtime and dari-inspector-protocol; you don't declare them. The optional Gradle plugin is published separately as io.github.easyhooon.dari. iOS uses the Swift package instead.
| Module | You add it | Purpose |
|---|---|---|
dari-core | Optional, for KMP commonMain | Shared models and the DariInterceptor contract |
dari | debugImplementation | Inspector UI, notifications, desktop connection |
dari-noop | releaseImplementation | Same API, records nothing |
dari-runtime | No, via dari | Capture and storage: DefaultDariInterceptor, Room |
dari-inspector-protocol | No, via dari | Wire protocol shared with the desktop app |
dari-core
Kotlin Multiplatform contracts module for Android, JVM, and iOS. It has no UI, Room database, or notifications and can be added to commonMain:
commonMain.dependencies {
implementation("io.github.easyhooon:dari-core:3.8.0")
}Contains:
DariConfig: configuration data classDariInterceptor: interface for capturing bridge messagesMessageEntry: data model for a bridge call lifecycleMessageStatus: enum:IN_PROGRESS,SUCCESS,ERRORMessageDirection: enum:WEB_TO_APP,APP_TO_WEB
KMP support currently covers these shared models and interception contracts. The inspector runtime, WebView integration, persistence, and UI remain Android-only, in dari and dari-runtime.
dari
Full debug implementation. Depends on dari-runtime, which depends on dari-core.
Contains:
Dari: singleton entry point (init,createInterceptor, settings such as masking and the desktop connection)- Inspector UI (Jetpack Compose), notifications and shake-to-open
- Desktop inspector connection
- Hooks that the Gradle plugin calls
Add to debugImplementation only.
dari-runtime
Capture and storage, pulled in by dari:
DefaultDariInterceptor: saves each call and pairs responses with requests- Room database + DAO, with the
maxEntriesandretentionPeriodlimits
dari-inspector-protocol
The messages dari and the desktop app exchange. The two ship separately, so each side checks InspectorProtocol.VERSION when it connects and refuses a mismatch.
dari-noop
No-op stub that depends on dari-core. Dari.init() and other runtime APIs do nothing, while Dari.createInterceptor() returns null.
Add to releaseImplementation to ensure zero runtime overhead in production builds.