Skip to content

Commit cd3a4e3

Browse files
Merge branch 'main' into app-metadata
2 parents a489555 + 4409eb7 commit cd3a4e3

File tree

72 files changed

+4591
-505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4591
-505
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Release
33
on: workflow_dispatch
44

55
jobs:
6+
fetch_prebuilts:
7+
uses: ./.github/workflows/prebuild_assets.yml
8+
69
draft_release:
710
permissions:
811
contents: write
@@ -31,6 +34,8 @@ jobs:
3134
3235
maven_publish:
3336
runs-on: macos-latest
37+
needs:
38+
- fetch_prebuilts
3439
steps:
3540
- uses: actions/checkout@v5
3641
- name: Validate Gradle Wrapper
@@ -39,17 +44,23 @@ jobs:
3944
with:
4045
path: ~/.konan
4146
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
42-
- name: Set up JDK 17
47+
- name: Set up JDK 25
4348
uses: actions/setup-java@v3
4449
with:
45-
java-version: '17'
50+
java-version: '25'
4651
distribution: 'temurin'
4752
- name: Set up Gradle
4853
uses: gradle/actions/setup-gradle@v4
54+
- name: Download prebuilts
55+
uses: actions/download-artifact@v5
56+
with:
57+
artifact-ids: ${{ needs.fetch_prebuilts.outputs.artifact_id }}
58+
path: internal/prebuild-binaries/build/output/
4959
- name: Gradle publish
5060
run: |
5161
./gradlew \
5262
--no-configuration-cache \
63+
-PhasPrebuiltAssets=true \
5364
-PGITHUB_PUBLISH_TOKEN="${{ secrets.GITHUB_TOKEN }}" \
5465
-PsigningInMemoryKey="${{ secrets.SIGNING_KEY }}" \
5566
-PsigningInMemoryKeyId="${{ secrets.SIGNING_KEY_ID }}" \
@@ -62,6 +73,8 @@ jobs:
6273

6374
build_xcframeworks:
6475
name: Build XCFrameworks
76+
needs:
77+
- fetch_prebuilts
6578
runs-on: macos-latest
6679
steps:
6780
- uses: actions/checkout@v4
@@ -71,17 +84,22 @@ jobs:
7184
with:
7285
path: ~/.konan
7386
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
74-
- name: Set up JDK 17
87+
- name: Set up JDK 25
7588
uses: actions/setup-java@v3
7689
with:
77-
java-version: '17'
90+
java-version: '25'
7891
distribution: 'temurin'
7992
- name: Set up Gradle
8093
uses: gradle/actions/setup-gradle@v4
8194
with:
8295
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
96+
- name: Download prebuilts
97+
uses: actions/download-artifact@v5
98+
with:
99+
artifact-ids: ${{ needs.fetch_prebuilts.outputs.artifact_id }}
100+
path: internal/prebuild-binaries/build/output/
83101
- name: Build frameworks
84-
run: "./gradlew internal:PowerSyncKotlin:buildRelease"
102+
run: "./gradlew -PhasPrebuiltAssets=true internal:PowerSyncKotlin:buildRelease"
85103

86104
- uses: actions/upload-artifact@v4
87105
with:
@@ -94,7 +112,7 @@ jobs:
94112
add_assets:
95113
permissions:
96114
contents: write
97-
needs: [draft_release, build_xcframeworks]
115+
needs: [draft_release, build_xcframeworks, fetch_prebuilts]
98116
name: Add assets to pending release
99117
runs-on: ubuntu-latest
100118
steps:
@@ -103,14 +121,25 @@ jobs:
103121
fetch-depth: 0
104122
- uses: actions/download-artifact@v4
105123
with:
106-
merge-multiple: true
107-
- run: "ls -al"
124+
name: XCFramework
125+
- name: Download prebuilts
126+
uses: actions/download-artifact@v5
127+
with:
128+
artifact-ids: ${{ needs.fetch_prebuilts.outputs.artifact_id }}
129+
path: internal/prebuild-binaries/build/output/
130+
131+
- name: Archive prebuilts
132+
run: |
133+
find internal/prebuild-binaries/build/output
134+
zip -r prebuilt_libraries.zip internal/prebuild-binaries/build/output/
135+
108136
- name: Upload XCFramework
109137
env:
110138
GH_TOKEN: ${{ github.token }}
111139
GH_REPO: ${{ github.repository }}
112140
run: |
113141
gh release upload "${{ needs.draft_release.outputs.tag }}" PowersyncKotlinRelease.zip
142+
gh release upload "${{ needs.draft_release.outputs.tag }}" prebuilt_libraries.zip
114143
115144
- name: "Update release description"
116145
env:

.github/workflows/docs-deploy.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,18 @@ jobs:
2020
with:
2121
path: ~/.konan
2222
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
23-
- name: Set up JDK 17
23+
- name: Set up JDK 25
2424
uses: actions/setup-java@v3
2525
with:
26-
java-version: '17'
26+
java-version: '25'
2727
distribution: 'temurin'
2828
- name: Set up Gradle
2929
uses: gradle/actions/setup-gradle@v4
3030
with:
3131
validate-wrappers: true
3232
- name: Build Docs
3333
run: |
34-
./gradlew --scan \
35-
--no-configuration-cache \
36-
-PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
37-
dokkaGenerate
34+
./gradlew --scan dokkaGenerate
3835
shell: bash
3936
- name: Upload static files as artifact
4037
id: deployment
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Prebuild SQLite assets
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
artifact_url:
7+
description: "URL of the artifact containing precompiled SQLite binaries"
8+
value: ${{ jobs.compile.outputs.artifact_url }}
9+
artifact_id:
10+
description: "id of the artifact containing precompiled SQLite binaries"
11+
value: ${{ jobs.compile.outputs.artifact_id }}
12+
13+
jobs:
14+
compile:
15+
name: Compile SQLite
16+
timeout-minutes: 30
17+
runs-on: macos-latest
18+
outputs:
19+
artifact_url: ${{ steps.upload.outputs.artifact-url }}
20+
artifact_id: ${{ steps.upload.outputs.artifact-id }}
21+
steps:
22+
- uses: actions/checkout@v5
23+
with:
24+
fetch-depth: 0
25+
- uses: actions/cache@v4
26+
id: cache_prebuild
27+
with:
28+
path: internal/prebuild-binaries/build/output
29+
key: sqlite-build-${{ hashFiles('internal/prebuild-binaries/build.gradle.kts', 'plugins/build-plugin/src') }}
30+
31+
- name: Validate Gradle Wrapper
32+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
33+
uses: gradle/actions/wrapper-validation@v4
34+
- uses: actions/cache@v4
35+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
36+
with:
37+
path: ~/.konan
38+
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
39+
- name: Set up JDK 25
40+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
41+
uses: actions/setup-java@v4
42+
with:
43+
java-version: '25'
44+
distribution: 'temurin'
45+
- name: Set up Gradle
46+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
47+
uses: gradle/actions/setup-gradle@v4
48+
with:
49+
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
50+
- name: Set up XCode
51+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
52+
uses: maxim-lobanov/setup-xcode@v1
53+
- name: Download build tools
54+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
55+
run: |
56+
brew install lld
57+
cd internal/prebuild-binaries
58+
./download_glibc.sh
59+
./download_llvm_mingw.sh
60+
61+
- name: Compile SQLite with Gradle
62+
if: steps.cache_prebuild.outputs.cache-hit != 'true'
63+
run: |
64+
./gradlew --scan --configure-on-demand internal:prebuild-binaries:compileAll
65+
shell: bash
66+
- uses: actions/upload-artifact@v5
67+
id: upload
68+
with:
69+
path: internal/prebuild-binaries/build/output/*
70+
name: kotlin-sqlite
71+
retention-days: 1
72+
- run: |
73+
echo "${{ steps.upload.outputs.artifact-url }}"

.github/workflows/test.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,27 @@ permissions:
1111
contents: read
1212

1313
jobs:
14+
fetch_prebuilts:
15+
uses: ./.github/workflows/prebuild_assets.yml
16+
1417
build:
18+
needs:
19+
- fetch_prebuilts
1520
strategy:
1621
matrix:
1722
include:
1823
- os: macos-latest
19-
name: macos-watchos-tvos
20-
targets: watchosSimulatorArm64Test tvosSimulatorArm64Test
24+
name: watchos
25+
targets: watchosSimulatorArm64Test
2126
- os: macos-latest
22-
name: mac-ios-macos
23-
targets: iosSimulatorArm64Test macosArm64Test
27+
name: tvos
28+
targets: tvosSimulatorArm64Test
2429
- os: macos-latest
25-
name: mac-jvm
26-
targets: jvmTest
30+
name: ios
31+
targets: iosSimulatorArm64Test
32+
- os: macos-latest
33+
name: macos
34+
targets: jvmTest macosArm64Test
2735
- os: ubuntu-latest
2836
name: ubuntu
2937
targets: testDebugUnitTest testReleaseUnitTest jvmTest lintKotlin
@@ -32,7 +40,7 @@ jobs:
3240
targets: jvmTest
3341
runs-on: ${{ matrix.os }}
3442
name: Test ${{ matrix.name }}
35-
timeout-minutes: 20
43+
timeout-minutes: 30
3644

3745
steps:
3846
- uses: actions/checkout@v4
@@ -42,10 +50,10 @@ jobs:
4250
with:
4351
path: ~/.konan
4452
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
45-
- name: Set up JDK 17
53+
- name: Set up JDK 25
4654
uses: actions/setup-java@v4
4755
with:
48-
java-version: '17'
56+
java-version: '25'
4957
distribution: 'temurin'
5058
- name: Set up Gradle
5159
uses: gradle/actions/setup-gradle@v4
@@ -58,10 +66,15 @@ jobs:
5866
with:
5967
# TODO: Update to latest-stable once GH installs iOS 26 simulators
6068
xcode-version: '^16.4.0'
69+
- name: Download prebuilts
70+
uses: actions/download-artifact@v5
71+
with:
72+
artifact-ids: ${{ needs.fetch_prebuilts.outputs.artifact_id }}
73+
path: internal/prebuild-binaries/build/output/
6174

6275
- name: Build and run tests with Gradle
6376
run: |
64-
./gradlew --scan \
77+
./gradlew --scan -PhasPrebuiltAssets=true \
6578
${{ matrix.targets }}
6679
shell: bash
6780

@@ -90,10 +103,10 @@ jobs:
90103
with:
91104
path: ~/.konan
92105
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
93-
- name: Set up JDK 17
106+
- name: Set up JDK 25
94107
uses: actions/setup-java@v4
95108
with:
96-
java-version: '17'
109+
java-version: '25'
97110
distribution: 'temurin'
98111
- name: Set up Gradle
99112
uses: gradle/actions/setup-gradle@v4
@@ -125,4 +138,4 @@ jobs:
125138
disable-animations: false
126139
avd-name: $AVD_NAME
127140
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
128-
script: ./gradlew --scan core-tests-android:connectedCheck
141+
script: ./gradlew --scan --configure-on-demand core-tests-android:connectedCheck

CHANGELOG.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Changelog
22

3-
## 1.9.0 (unreleased)
4-
5-
- Sync options: `newClientImplementation` is now the default.
6-
- Make `androidx.sqlite:sqlite-bundled` an API dependency of `:core` to avoid toolchain warnings.
3+
## 1.10.0
74
- Add `appMetadata` parameter to `PowerSyncDatabase.connect()` to include application metadata in sync requests. This metadata is merged into sync requests and displayed in PowerSync service logs.
85

96
```kotlin
@@ -16,6 +13,14 @@ database.connect(
1613
)
1714
```
1815

16+
## 1.9.0
17+
18+
- Updated user agent string formats to allow viewing version distributions in the new PowerSync dashboard.
19+
- Sync options: `newClientImplementation` is now the default.
20+
- Make `androidx.sqlite:sqlite-bundled` an API dependency of `:core` to avoid toolchain warnings.
21+
- On Apple platforms, use a websocket protocol as a workaround to clients not supporting backpressure in HTTP response
22+
streams.
23+
1924
## 1.8.1
2025

2126
- Add POM name and description for `:common` project.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ and API documentation [here](https://powersync-ja.github.io/powersync-kotlin/).
4141
connector provides the connection between your application backend and the PowerSync managed database. It is used to:
4242
1. Retrieve a token to connect to the PowerSync service.
4343
2. Apply local changes on your backend application server (and from there, to your backend database).
44+
- [sqlite3multipleciphers](./sqlite3multipleciphers/)
45+
46+
- A SQLite driver implementation based on SQLite3MultipleCiphers.
4447

4548
## Demo Apps / Example Projects
4649

0 commit comments

Comments
 (0)