Skip to content

Commit 245bd01

Browse files
Merge branch 'pre-update-kotlin' into grdb-csqlite
2 parents 01b5aa1 + 9c2cb29 commit 245bd01

File tree

4 files changed

+48
-27
lines changed

4 files changed

+48
-27
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,25 @@ jobs:
1414
uses: maxim-lobanov/setup-xcode@v1
1515
with:
1616
xcode-version: latest-stable
17-
18-
- name: Test on iOS simulator
17+
- name: Build and Test
1918
run: |
2019
xcodebuild test -scheme PowerSync-Package -destination "platform=iOS Simulator,name=iPhone 16"
21-
- name: Test on macOS
22-
run: |
2320
xcodebuild test -scheme PowerSync-Package -destination "platform=macOS,arch=arm64,name=My Mac"
24-
- name: Test on watchOS simulator
25-
run: |
2621
xcodebuild test -scheme PowerSync-Package -destination "platform=watchOS Simulator,arch=arm64,name=Apple Watch Ultra 2 (49mm)"
22+
23+
buildSwift6:
24+
name: Build and test with Swift 6
25+
runs-on: macos-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up XCode
29+
uses: maxim-lobanov/setup-xcode@v1
30+
with:
31+
xcode-version: latest-stable
32+
- name: Use Swift 6
33+
run: |
34+
sed -i '' 's|^// swift-tools-version:.*$|// swift-tools-version:6.1|' Package.swift
35+
- name: Build and Test
36+
run: |
37+
swift build -Xswiftc -strict-concurrency=complete
38+
swift test -Xswiftc -strict-concurrency=complete

Package.resolved

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.1
1+
// swift-tools-version: 5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
@@ -20,9 +20,7 @@ let encryption = true
2020
// a binary target.
2121
// With a local SDK, we point to a `Package.swift` within the Kotlin SDK containing a target pointing
2222
// towards a local framework build
23-
var conditionalDependencies: [Package.Dependency] = [
24-
]
25-
23+
var conditionalDependencies: [Package.Dependency] = []
2624
var conditionalTargets: [Target] = []
2725
var kotlinTargetDependency = Target.Dependency.target(name: "PowerSyncKotlin")
2826

@@ -40,11 +38,13 @@ if let kotlinSdkPath = localKotlinSdkOverride {
4038
kotlinTargetDependency = .product(name: "PowerSyncKotlin", package: "PowerSyncKotlin")
4139
} else {
4240
// Not using a local build, so download from releases
43-
conditionalTargets.append(.binaryTarget(
44-
name: "PowerSyncKotlin",
45-
url: "https://github.com/powersync-ja/powersync-kotlin/releases/download/v1.8.0/PowersyncKotlinRelease.zip",
46-
checksum: "31ac7c5e11d747e11bceb0b34f30438d37033e700c621b0a468aa308d887587f"
47-
))
41+
conditionalTargets.append(
42+
.binaryTarget(
43+
name: "PowerSyncKotlin",
44+
url:
45+
"https://github.com/powersync-ja/powersync-kotlin/releases/download/v1.9.0/PowersyncKotlinRelease.zip",
46+
checksum: "6d9847391ab2bbbca1f6a7abe163f0682ddca4a559ef5a1d2567b3e62e7d9979"
47+
))
4848
}
4949

5050
var corePackageName = "powersync-sqlite-core-swift"
@@ -53,18 +53,19 @@ if let corePath = localCoreExtension {
5353
corePackageName = "powersync-sqlite-core"
5454
} else {
5555
// Not using a local build, so download from releases
56-
conditionalDependencies.append(.package(
57-
url: "https://github.com/powersync-ja/powersync-sqlite-core-swift.git",
58-
exact: "0.4.8"
59-
))
56+
conditionalDependencies.append(
57+
.package(
58+
url: "https://github.com/powersync-ja/powersync-sqlite-core-swift.git",
59+
exact: "0.4.10"
60+
))
6061
}
6162

6263
let package = Package(
6364
name: packageName,
6465
platforms: [
6566
.iOS(.v15),
6667
.macOS(.v12),
67-
.watchOS(.v9)
68+
.watchOS(.v9),
6869
],
6970
products: [
7071
// Products define the executables and libraries a package produces, making them visible to other packages.
@@ -88,7 +89,8 @@ let package = Package(
8889
)
8990
],
9091
dependencies: conditionalDependencies + [
91-
.package(url: "https://github.com/groue/GRDB.swift.git", from: "7.7.0")
92+
.package(url: "https://github.com/groue/GRDB.swift.git", from: "7.7.0"),
93+
.package(url: "git@github.com:powersync-ja/CSQLite.git", revision: "init")
9294
],
9395
targets: [
9496
// Targets are the basic building blocks of a package, defining a module or a test suite.
@@ -108,7 +110,6 @@ let package = Package(
108110
dependencies: [
109111
.target(name: "PowerSync"),
110112
.product(name: "GRDB", package: "GRDB.swift")
111-
112113
]
113114
),
114115
.testTarget(

Sources/PowerSync/Kotlin/KotlinAdapter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ enum KotlinAdapter {
5050
name: table.name,
5151
put: translateStatement(table.put),
5252
delete: translateStatement(table.delete),
53-
clear: table.clear,
53+
clear: table.clear
5454
);
5555
}
5656

0 commit comments

Comments
 (0)