File tree Expand file tree Collapse file tree 7 files changed +13
-20
lines changed
Expand file tree Collapse file tree 7 files changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -61,26 +61,18 @@ runs:
6161 path : android/build/distributions/powersync_android.zip
6262 if-no-files-found : error
6363
64- - name : Copy static libraries
64+ - name : Copy individual libraries
6565 shell : bash
6666 run : |
67- cp target/aarch64-linux-android/release/libpowersync.a libpowersync_aarch64.android.a
6867 cp target/aarch64-linux-android/release/libpowersync.so libpowersync_aarch64.android.so
69-
70- cp target/armv7-linux-androideabi/release/libpowersync.a libpowersync_armv7.android.a
7168 cp target/armv7-linux-androideabi/release/libpowersync.so libpowersync_armv7.android.so
72-
73- cp target/i686-linux-android/release/libpowersync.a libpowersync_x86.android.a
7469 cp target/i686-linux-android/release/libpowersync.so libpowersync_x86.android.so
75-
76- cp target/x86_64-linux-android/release/libpowersync.a libpowersync_x64.android.a
7770 cp target/x86_64-linux-android/release/libpowersync.so libpowersync_x64.android.so
7871
79- - name : Upload static libraries
72+ - name : Upload individual libraries
8073 uses : actions/upload-artifact@v4
8174 with :
8275 name : android-static
8376 retention-days : 14
8477 path : |
85- *.a
8678 *.so
Original file line number Diff line number Diff line change @@ -185,6 +185,9 @@ jobs:
185185 with :
186186 name : android-static
187187
188+ - name : Create archive of static libs for Kotlin
189+ run : zip static_libs.zip *.lib *.a
190+
188191 - name : List libraries
189192 run : ls -al
190193
@@ -194,10 +197,9 @@ jobs:
194197 GH_REPO : ${{ github.repository }}
195198 run : |
196199 gh release upload "${{ needs.draft_release.outputs.tag }}" *.dll
197- gh release upload "${{ needs.draft_release.outputs.tag }}" *.lib
198200 gh release upload "${{ needs.draft_release.outputs.tag }}" *.dylib
199201 gh release upload "${{ needs.draft_release.outputs.tag }}" *.so
200- gh release upload "${{ needs.draft_release.outputs.tag }}" *.a
202+ gh release upload "${{ needs.draft_release.outputs.tag }}" static_libs.zip
201203
202204 publish_wasm :
203205 name : Publish WASM builds
Original file line number Diff line number Diff line change @@ -95,10 +95,6 @@ val buildRust = tasks.register<Exec>("buildRust") {
9595 rustCompilation(" powersync_loadable" , " ./android/build/intermediates/jniLibs" )
9696}
9797
98- val buildRustStatic = tasks.register<Exec >(" buildRustStatic" ) {
99- rustCompilation(" powersync_static" )
100- }
101-
10298val prefabAar = tasks.register<Zip >(" prefabAar" ) {
10399 dependsOn(buildRust)
104100
@@ -218,5 +214,5 @@ val zipPublication by tasks.registering(Zip::class) {
218214}
219215
220216tasks.named(" build" ) {
221- dependsOn(prefabAar, buildRustStatic )
217+ dependsOn(prefabAar)
222218}
Original file line number Diff line number Diff line change 11Builds the core extension as a static library, exposing the ` powersync_init_static ` function to load it.
2+
3+ We only use this crate to compile for watchOS, since the regular ` loadable ` build compiling to a dylib
4+ doesn't support that platform.
5+
6+ Most users should probably compile the ` loadable ` crate instead, which also emits a static library. If
7+ SQLite is linked statically, compiling ` loadable ` with the ` static ` feature enabled works.
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ function compile() {
66 local suffix=$2
77
88 cargo build -p powersync_loadable -Z build-std=panic_abort,core,alloc --features nightly --release --target $triple
9- cargo build -p powersync_static -Z build-std=panic_abort,core,alloc --features nightly --release --target $triple
109
1110 mv " target/$triple /release/libpowersync.so" " libpowersync_$suffix .linux.so"
1211 mv " target/$triple /release/libpowersync.a" " libpowersync_$suffix .linux.a"
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ function compile() {
77 local os=$3
88
99 cargo build -p powersync_loadable -Z build-std=panic_abort,core,alloc --features nightly --release --target $triple
10- cargo build -p powersync_static -Z build-std=panic_abort,core,alloc --features nightly --release --target $triple
1110
1211 mv " target/$triple /release/libpowersync.dylib" " libpowersync_$suffix .$os .dylib"
1312 mv " target/$triple /release/libpowersync.a" " libpowersync_$suffix .$os .a"
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ function compile() {
66 local suffix=$2
77
88 cargo build -p powersync_loadable -Z build-std=panic_abort,core,alloc --features=nightly --release --target $triple
9- cargo build -p powersync_static -Z build-std=panic_abort,core,alloc --features=nightly --release --target $triple
109
1110 mv " target/$triple /release/powersync.dll" " powersync_$suffix .dll"
1211 mv " target/$triple /release/powersync.lib" " powersync_$suffix .lib"
You can’t perform that action at this time.
0 commit comments