Skip to content

Commit bff3fd7

Browse files
committed
Add changelogs
1 parent 68407a0 commit bff3fd7

File tree

7 files changed

+17
-15
lines changed

7 files changed

+17
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Remove internal SQLDelight and SQLiter dependencies.
66
* Add `rawConnection` getter to `ConnectionContext`, which is a `SQLiteConnection` instance from
77
`androidx.sqlite` that can be used to step through statements in a custom way.
8+
* Add an integration for the Room database library ([readme](integrations/room/README.md)).
89

910
## 1.5.1
1011

core/src/androidMain/kotlin/com/powersync/DatabaseDriverFactory.android.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ public fun BundledSQLiteDriver.addPowerSyncExtension() {
2222
addExtension("libpowersync.so", "sqlite3_powersync_init")
2323
}
2424

25-
public actual fun resolvePowerSyncLoadableExtensionPath(): String? {
26-
return "libpowersync.so"
27-
}
25+
public actual fun resolvePowerSyncLoadableExtensionPath(): String? = "libpowersync.so"

core/src/appleNonWatchOsMain/kotlin/com/powersync/DatabaseDriverFactory.appleNonWatchOs.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,4 @@ public actual class DatabaseDriverFactory {
2323
}
2424

2525
@ExperimentalPowerSyncAPI
26-
public actual fun resolvePowerSyncLoadableExtensionPath(): String? {
27-
return powerSyncExtensionPath
28-
}
26+
public actual fun resolvePowerSyncLoadableExtensionPath(): String? = powerSyncExtensionPath

core/src/jvmMain/kotlin/com/powersync/DatabaseDriverFactory.jvm.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,4 @@ public fun BundledSQLiteDriver.addPowerSyncExtension() {
2222
private val powersyncExtension: String by lazy { extractLib("powersync") }
2323

2424
@ExperimentalPowerSyncAPI
25-
public actual fun resolvePowerSyncLoadableExtensionPath(): String? {
26-
return powersyncExtension
27-
}
25+
public actual fun resolvePowerSyncLoadableExtensionPath(): String? = powersyncExtension

integrations/room/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Room support, meaning that:
99

1010
## Setup
1111

12+
Add a dependency on `com.powersync:integration-room` with the same version you use for the main
13+
PowerSync SDK.
14+
1215
PowerSync can use an existing Room database, provided that the PowerSync core SQLite extension has
1316
been loaded. To do that:
1417

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
POM_ARTIFACT_ID=integration-room
2+
POM_NAME=Room integration for PowerSync
3+
POM_DESCRIPTION=Use PowerSync to sync data from Room databases.

plugins/build-plugin/src/main/kotlin/SharedBuildPlugin.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ class SharedBuildPlugin : Plugin<Project> {
4343

4444
linkTaskProvider.configure {
4545
inputs.files(sharedFiles)
46+
47+
val frameworkRoot = sharedFiles.singleFile
48+
.resolve("powersync-sqlite-core.xcframework/$abiName")
49+
.path
50+
51+
linkerOpts("-F", frameworkRoot)
52+
linkerOpts("-rpath", frameworkRoot)
4653
}
4754
linkerOpts("-framework", "powersync-sqlite-core")
4855

49-
val frameworkRoot = sharedFiles.singleFile
50-
.resolve("powersync-sqlite-core.xcframework/$abiName")
51-
.path
52-
53-
linkerOpts("-F", frameworkRoot)
54-
linkerOpts("-rpath", frameworkRoot)
5556
}
5657
}
5758
}

0 commit comments

Comments
 (0)