Skip to content

Commit f25712f

Browse files
committed
Document all build steps
1 parent 5b402a7 commit f25712f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

sqlite3multipleciphers/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ docker build -t powersync_kotlin_sqlite3mc_build_helper --load src/jni
1212

1313
To compile for Windows, we use [llvm-mingw](https://github.com/mstorsjo/llvm-mingw),
1414
which needs to be downloaded.
15+
16+
With all dependencies ready, run the Gradle task:
17+
18+
```shell
19+
./gradlew sqlite3multipleciphers:jniCompile -PllvmMingw='.../Downloads/llvm-mingw-20251104-ucrt-macos-universal'
20+
```
21+
22+
This outputs binaries to `build/jni-build/`.

sqlite3multipleciphers/build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,14 @@ fun registerCompileMacOsHostTask(arm: Boolean): TaskProvider<Exec> {
265265

266266
fun registerCompileWindowsOnMacOsTask(arm: Boolean): TaskProvider<Exec> {
267267
val architecture = if (arm) JniTarget.WINDOWS_ARM else JniTarget.WINDOWS_X64
268+
val path = providers.gradleProperty("llvmMingw")
268269

269270
return tasks.register<Exec>("jniCompile${architecture.name}") {
270-
registerCompileOnHostTask(architecture, clang = "/Users/simon/Downloads/llvm-mingw-20251104-ucrt-macos-universal/bin/clang")
271+
val clang = path.orNull?.let {
272+
Path(path.get()).resolve("bin/clang").toString()
273+
} ?: "clang"
274+
275+
registerCompileOnHostTask(architecture, clang = clang)
271276
}
272277
}
273278

0 commit comments

Comments
 (0)