File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,22 @@ kotlin {
48
48
```
49
49
50
50
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.
52
52
53
53
``` kotlin
54
54
val bindingsInstall = tasks.register(" sqlite3BindingsInstall" ) {
55
55
doLast {
56
- val sqlite3moduleDir = rootProject. buildDir.resolve(" js/node_modules/sqlite3" )
56
+ val sqlite3moduleDir = buildDir.resolve(" js/node_modules/sqlite3" )
57
57
if (! sqlite3moduleDir.resolve(" lib/binding" ).exists()) {
58
58
exec {
59
59
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"
61
67
commandLine(commandLine)
62
68
}
63
69
}
You can’t perform that action at this time.
0 commit comments