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
36 lines
1.4 KiB
Kotlin
36 lines
1.4 KiB
Kotlin
import androidx.room.gradle.RoomExtension
|
|
import org.gradle.api.Plugin
|
|
import org.gradle.api.Project
|
|
import org.gradle.kotlin.dsl.configure
|
|
import org.gradle.kotlin.dsl.dependencies
|
|
|
|
class KmpRoomConventionPlugin : Plugin<Project> {
|
|
override fun apply(target: Project) {
|
|
with(target) {
|
|
pluginManager.apply("androidx.room")
|
|
pluginManager.apply("com.google.devtools.ksp")
|
|
|
|
extensions.configure<RoomExtension> {
|
|
schemaDirectory("$projectDir/schemas")
|
|
}
|
|
|
|
extensions.configure<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension> {
|
|
sourceSets.commonMain.dependencies {
|
|
implementation(libs.findLibrary("room-runtime").get())
|
|
implementation(libs.findLibrary("sqlite-bundled").get())
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
add("kspCommonMainMetadata", libs.findLibrary("room-compiler").get())
|
|
add("kspAndroid", libs.findLibrary("room-compiler").get())
|
|
add("kspIosArm64", libs.findLibrary("room-compiler").get())
|
|
add("kspIosSimulatorArm64", libs.findLibrary("room-compiler").get())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private val Project.libs
|
|
get() = extensions.getByType(org.gradle.api.artifacts.VersionCatalogsExtension::class.java)
|
|
.named("libs")
|