Librechat-Mobile/shared/build.gradle.kts
Garfie 770603e466 KMP iOS migration
Complete Kotlin Multiplatform migration with iOS parity:
- All 13 modules converted to KMP (commonMain + androidMain + iosMain)
- 100% feature parity: auth, chat, SSE streaming, conversations,
  settings, agents, files, voice input, TTS, OAuth, file picker,
  clipboard paste
- Platform consolidation: DataStore path, SessionCacheCleaner,
  bubble layouts, ChatInput core, MIME types, mention parsing,
  TextField styling, FilterChip components extracted to commonMain
- iOS crash reporting via Kotlin/Native exception hook
- YAML parsing via custom pure-Kotlin parser (zero dependencies)
- Dependency health: Timber removed, kaml replaced, FuzzyWuzzy removed,
  security-crypto stabilized
- CONTRIBUTING.md
- Gradle configuration cache enabled
2026-04-02 19:54:58 -05:00

66 lines
2.3 KiB
Text

plugins {
id("librechat.kmp.library")
id("librechat.kmp.compose")
id("librechat.kmp.koin")
id("librechat.kotlin.serialization")
alias(libs.plugins.skie)
}
android {
namespace = "com.librechat.shared"
}
kotlin {
listOf(iosArm64(), iosSimulatorArm64()).forEach { target ->
target.binaries.framework {
baseName = "Shared"
isStatic = true
// Export core modules so iOS can see all public types through the single framework
export(project(":core:common"))
export(project(":core:model"))
export(project(":core:network"))
export(project(":core:data"))
}
}
sourceSets {
commonMain.dependencies {
api(project(":core:common"))
api(project(":core:model"))
api(project(":core:network"))
api(project(":core:data"))
api(project(":core:ui"))
implementation(project(":feature:auth"))
implementation(project(":feature:chat"))
implementation(project(":feature:conversations"))
implementation(project(":feature:settings"))
implementation(project(":feature:agents"))
implementation(project(":feature:files"))
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.kotlinx.serialization.json)
implementation(libs.coroutines.core)
implementation(libs.kermit)
implementation(libs.navigation.compose.kmp)
implementation(libs.lifecycle.runtime.compose.kmp)
implementation(libs.lifecycle.viewmodel.compose.kmp)
implementation(libs.koin.compose)
implementation(libs.koin.compose.viewmodel)
implementation(libs.koin.compose.viewmodel.navigation)
}
iosMain.dependencies {
implementation(libs.ktor.client.darwin)
}
}
}
skie {
features {
// All features enabled by default:
// - Sealed classes → Swift enums (onEnum(of:))
// - Flow → AsyncSequence
// - Suspend → async/await
// No configuration needed for defaults
}
}