Installation

Table of contents
  1. Prerequisites
  2. Add Maven Central
  3. Add the dependency
    1. Kotlin Multiplatform (commonMain)
    2. Android-only
    3. JVM-only
  4. Version catalog
  5. Verify
  6. Next

Sqkon is published to Maven Central as com.mercury.sqkon:library. It is a Kotlin Multiplatform library targeting Android and JVM. The current version is {{ site.sqkon_version }}.

Prerequisites

  • Kotlin 2.0+ (Sqkon is currently built against Kotlin 2.3.x)
  • Java toolchain 21 (required for the build; consumers compile against the artifacts)
  • Android minSdk 23+ (Android 6.0 Marshmallow)
  • The kotlinx-serialization Gradle plugin applied to your module — Sqkon stores values as JSON

Add Maven Central

Sqkon is on Maven Central, no special repositories are needed.

// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        mavenCentral()
        google() // only required if you also depend on AndroidX libraries
    }
}

If your project already pulls AndroidX or Compose dependencies, mavenCentral() is almost certainly already configured — no change needed.

Add the dependency

Kotlin Multiplatform (commonMain)

// build.gradle.kts
plugins {
    kotlin("multiplatform")
    kotlin("plugin.serialization")
}

kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("com.mercury.sqkon:library:{{ site.sqkon_version }}")
        }
    }
}

Android-only

// build.gradle.kts (Android module)
plugins {
    id("com.android.library") // or com.android.application
    kotlin("android")
    kotlin("plugin.serialization")
}

dependencies {
    implementation("com.mercury.sqkon:library:{{ site.sqkon_version }}")
}

JVM-only

// build.gradle.kts (JVM module)
plugins {
    kotlin("jvm")
    kotlin("plugin.serialization")
}

dependencies {
    implementation("com.mercury.sqkon:library:{{ site.sqkon_version }}")
}

Version catalog

If you use a Gradle version catalog, add Sqkon to gradle/libs.versions.toml:

[versions]
sqkon = "{{ site.sqkon_version }}"

[libraries]
sqkon = { module = "com.mercury.sqkon:library", version.ref = "sqkon" }

Then reference it in your build script:

dependencies {
    implementation(libs.sqkon)
}

Sqkon brings its own SQLDelight driver and the AndroidX SQLite bundled native library transitively. You do not need to add SQLDelight or androidx.sqlite directly unless you use them outside Sqkon.

Verify

Run a quick build to confirm resolution:

./gradlew :app:dependencies --configuration releaseRuntimeClasspath | grep sqkon

You should see com.mercury.sqkon:library:{{ site.sqkon_version }} in the resolved tree.

Next