srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

Could not get unknown property 'npm_run_build' for project #372

Open maruthijr opened 3 years ago

maruthijr commented 3 years ago

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'.

deepy commented 3 years ago

Does it work if you change to the following?

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