Project I’m currently working on is using old plugin: ‘com.moowork.grunt’ and I want to migrate it to ‘com.github.node-gradle.node’
I this read the grunt doc in FAQ but still I am not able to understand how to migrate my older grunt task code, I m beginner please help
this was my older code with moowork plugin –
apply plugin: 'com.moowork.grunt'
grunt {
workDir = file("${project.projectDir}")
colors = true
bufferOutput = false
}
grunt_bowercopy.dependsOn 'npmInstall'
grunt_copy.dependsOn 'npmInstall'
war.dependsOn grunt_bowercopy
war.dependsOn grunt_copy
war.dependsOn grunt_less
war.dependsOn grunt_stylus
I tried doing like this –
apply plugin: 'com.github.node-gradle.node'
task buildWebapp(type: NpxTask) {
dependsOn npmInstall
command = "grunt"
args = ["build"]
inputs.file("Gruntfile.js")
inputs.dir("src")
inputs.dir("node_modules")
outputs.dir("dist")
}
war.dependsOn buildWebapp
But this is not working and build failed –
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':udm:buildWebapp'.
> Process 'command 'C:UsersarjunUDM_newdcs-udmudmnode-v16.19.1-win-x64npx.cmd'' finished with non-zero exit value 3
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 38s
Please help me.