Robert Jaros
03/14/2020, 10:57 PMbuild.gradle.kts
full path to the binary of NodeJs installed by the gradle plugin (it's ~/.gradle/nodejs/node-v12.14.0-linux-x64/bin/node
for me)?Robert Jaros
03/14/2020, 10:58 PMenvironment
val is internal
in NodeJsRootExtension
:(Robert Jaros
03/14/2020, 11:18 PMfun getNodeJsBinaryExecutable(): String {
val nodeDir = NodeJsRootPlugin.apply(project).nodeJsSetupTask.destination
val isWindows = System.getProperty("os.name").toLowerCase().contains("windows")
val nodeBinDir = if (isWindows) nodeDir else nodeDir.resolve("bin")
val command = NodeJsRootPlugin.apply(project).nodeCommand
val finalCommand = if (isWindows && command == "node") "node.exe" else command
return nodeBinDir.resolve(finalCommand).absolutePath
}