Closed Diy2210 closed 4 years ago
id recommend checking out these resources on how to get started: https://johnoreilly.dev/posts/sqldelight-multiplatform/ https://cashapp.github.io/sqldelight/ https://github.com/cashapp/sqldelight/tree/master/sample
I dev kotlin multiplatform app use IceRock MOKO-Widgets-Templates lib I ran into a setup problem How to configure SQLDelight and record values in a database. My app build.gradle: plugins { id("com.android.library") id("org.jetbrains.kotlin.multiplatform") id("dev.icerock.mobile.multiplatform") id("dev.icerock.mobile.multiplatform-resources") id("com.squareup.sqldelight") }
android { compileSdkVersion(Versions.Android.compileSdk)
}
sqldelight { database("ServerDB") { packageName = "org.example.app" } }
val mppLibs = listOf( Deps.Libs.MultiPlatform.mokoResources, Deps.Libs.MultiPlatform.mokoWidgets )
setupFramework( exports = mppLibs )
dependencies { mppLibrary(Deps.Libs.MultiPlatform.kotlinStdLib) mppLibrary(Deps.Libs.MultiPlatform.coroutines)
}
multiplatformResources { multiplatformResourcesPackage = "org.example.library" }
Then i create and put ServerDB.sq to commonMain/sqldelight, what next?