Node toolchains
import org.ysb33r.gradle.jse.pnpm.toolchains.JsePnpmToolchain
plugins {
id 'org.ysb33r.jsecosystem.pnpm.base' version '5.0.0-alpha.3'
}
jsEcosystem {
toolchains {
pnpm(JsePnpmToolchain) {
executableByVersion('1.2.3') (1)
executableByPath('/path/to/pnpm') (2)
executableBySearchPath() (3)
withNodeToolchain('nodejs') (4)
withNodeToolchain(toolchains.named('nodejs', JseNodeToolchain)) (5)
withPnpmNode() (6)
withPnpmNode('1.2.3') (7)
}
}
}
| 1 | Use a specific version of pnpm. |
| 2 | Provide a hardcoded path to pnpm. |
| 3 | Look for pnpm in the system search path. |
| 4 | Associate a node toolchain called nodejs with this toolchain. |
| 5 | Associate a node toolchain using a provider. |
| 6 | Let pnpm manage its own version of node. |
| 7 | Let pnpm manage a specific version of node. |