File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,11 @@ docker build -t powersync_kotlin_sqlite3mc_build_helper --load src/jni
1212
1313To compile for Windows, we use [ llvm-mingw] ( https://github.com/mstorsjo/llvm-mingw ) ,
1414which 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/ ` .
Original file line number Diff line number Diff line change @@ -265,9 +265,14 @@ fun registerCompileMacOsHostTask(arm: Boolean): TaskProvider<Exec> {
265265
266266fun 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
You can’t perform that action at this time.
0 commit comments