Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions static-sqlite-driver/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ import org.jetbrains.kotlin.konan.target.PlatformManager
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.downloadPlugin)
alias(libs.plugins.kotlinter)
id("com.powersync.plugins.sonatype")
}

val sqliteVersion = "3490100"
val sqliteReleaseYear = "2025"

setupGithubRepository()

val downloads = layout.buildDirectory.dir("downloads")
val sqliteSrcFolder = downloads.map { it.dir("sqlite3") }

Expand Down Expand Up @@ -155,6 +154,7 @@ kotlin {
iosSimulatorArm64()

applyDefaultHierarchyTemplate()
explicitApi()

sourceSets {
all {
Expand Down Expand Up @@ -187,3 +187,5 @@ kotlin {
}
}
}

setupGithubRepository()
3 changes: 3 additions & 0 deletions static-sqlite-driver/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POM_ARTIFACT_ID=static-sqlite-driver
POM_NAME=Statically linked SQLite
POM_DESCRIPTION=A Kotlin-multiplatform bundle containing a static library for SQLite without Kotlin code.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.powersync.sqlite3

/**
* An empty Kotlin object.
*
* This package needs to provide a source to be published correctly. The only purpose of this package is to provide
* build scripts linking SQLite statically however, so this empty object is defined for publishing only.
*/
public object StaticSqliteDriver
15 changes: 9 additions & 6 deletions static-sqlite-driver/src/nativeTest/kotlin/SmokeTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ import kotlin.test.assertEquals
class SmokeTest {
@Test
fun canUseSqlite() {
val manager = createDatabaseManager(DatabaseConfiguration(
name = "test",
version = 1,
create = {},
inMemory = true,
))
val manager =
createDatabaseManager(
DatabaseConfiguration(
name = "test",
version = 1,
create = {},
inMemory = true,
),
)
val db = manager.createSingleThreadedConnection()
val stmt = db.createStatement("SELECT sqlite_version();")
val cursor = stmt.query()
Expand Down
Loading