Installation
Install ExoQuery in your Kotlin project with Gradle
Add the following to your build.gradle.kts. First add the plugin and then one of the below dependency blocks.
// First add the plugin:
plugins {
id("io.exoquery.exoquery-plugin") version "{EXOQUERY_PLUGIN_VERSION}"
kotlin("plugin.serialization") version "{KOTLIN_VERSION}" // exoquery relies on this
}
// Then add a runner...
// For Java (JDBC):
dependencies {
implementation("io.exoquery:exoquery-runner-jdbc:{EXOQUERY_RUNNER_VERSION}")
implementation("org.postgresql:postgresql:42.7.0") // Remember to include the right JDBC Driver
}
// For Java (R2DBC - Reactive):
dependencies {
implementation("io.exoquery:exoquery-runner-r2dbc:{EXOQUERY_RUNNER_VERSION}")
implementation("org.postgresql:r2dbc-postgresql:1.0.5.RELEASE") // Remember to include the right R2DBC Driver
}
// For: IOS, OSX, Native Linux, and Mingw using Kotlin Multiplatform
dependencies {
implementation("io.exoquery:exoquery-runner-native:{EXOQUERY_RUNNER_VERSION}")
// implementation("app.cash.sqldelight:native-driver:2.0.2") // Optional
}
// For Android:
dependencies {
implementation("io.exoquery:exoquery-runner-android:{EXOQUERY_RUNNER_VERSION}")
implementation("androidx.sqlite:sqlite-framework:2.4.0")
}
Version Numbers
ExoQueryβs Compiler Plugin component has versions that look like this: <KotlinVersion-ExoQueryPluginVersion.PL(.RC?)>
The runners have a version that looks like this: <ExoQueryPluginVersion.PL(.RC?)>.
That way the only the plugin-version needs to be bumped whenever a new version of Kotlin is released, not all of the runners too.
Sample Projects
Have a look at code samples for starter projects here:
- Basic Java project (JDBC) - https://github.com/ExoQuery/exoquery-sample-jdbc
- Basic Linux Native project: TBD
- Android and OSX project: https://github.com/ExoQuery/exoquery-sample-kmp