Skip to content

Commit 3219691

Browse files
authored
Update README.md
1 parent e26bd8e commit 3219691

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,22 @@ kotlin {
4848
```
4949

5050
You'll also need to install binary bindings for SQLite3. This can be done by adding a special Gradle task that runs yarn
51-
in the `sqlite3` node package directory.
51+
in the `sqlite3` node package directory. It needs to run `yarn` first to dowload platform specific binary dependencies.
5252

5353
```kotlin
5454
val bindingsInstall = tasks.register("sqlite3BindingsInstall") {
5555
doLast {
56-
val sqlite3moduleDir = rootProject.buildDir.resolve("js/node_modules/sqlite3")
56+
val sqlite3moduleDir = buildDir.resolve("js/node_modules/sqlite3")
5757
if (!sqlite3moduleDir.resolve("lib/binding").exists()) {
5858
exec {
5959
workingDir = sqlite3moduleDir
60-
val commandLine = "${yarn.yarnSetupTaskProvider.get().destination.absolutePath}/bin/yarn"
60+
val yarnPath="${yarn.yarnSetupTaskProvider.get().destination.absolutePath}/bin"
61+
val nodePath="${kotlinNodeJsExtension.nodeJsSetupTaskProvider.get().destination.absolutePath}/bin"
62+
environment(
63+
"PATH",
64+
System.getenv("PATH") + ":$yarnPath:$nodePath"
65+
)
66+
var commandLine = "$yarnPath/yarn"
6167
commandLine(commandLine)
6268
}
6369
}

0 commit comments

Comments
 (0)