gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Could not get unknown property 'npm_run_build' for project

Open maruthijr opened this issue 5 years ago • 1 comments

Gradle file: `buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "com.github.node-gradle:gradle-node-plugin:3.0.0-rc4" } }

apply plugin: "com.github.node-gradle.node"

node { download = true version = "12.18.3" }

task some_task { doLast {

} }

npm_run_build.dependsOn(some_task) ` gradle npm_run_build

Could not get unknown property 'npm_run_build' for project ':frontend' of type org.gradle.api.Project.

Second issues: I cannot depend on this task in another module like this: dependsOn ':frontend:npm_run_build'

Task with path ':frontend:npm_run_build' not found in project ':deploy'.

maruthijr avatar Nov 20 '20 03:11 maruthijr

Does it work if you change to the following?

tasks.named("npm_run_build").configure {
    dependsOn tasks.getByName("some_task")
}

deepy avatar Nov 24 '20 11:11 deepy