Closed candrews closed 1 year ago
If you change this to doLast {}
and use tasks.register()
I think that should work, the problem is you're querying the value before it has been set
But luckily there's a better place to get this from, it's now also available on the NodeExtension
as computedNodeDir
:
But luckily there's a better place to get this from, it's now also available on the
NodeExtension
ascomputedNodeDir
:
I figured it out - this works:
plugins {
id 'com.github.node-gradle.node' version '5.0.0'
}
node {
download = true
}
task nodeDir {
dependsOn nodeSetup
println node.computedNodeDir.get()
}
Thank you!
In version
4.0.0
, runninggradle nodeDir
with thisbuild.gradle
prints the node directory:However, that doesn't work with version
5.0.0
. Here's thebuild.gradle
:The result is:
I'm using gradle 8.1.1.