I am using this plugin: gradle-grunt-plugin
My build file consists of different sub-project(s) having different tasks defined in them. In one of the sub project (which is a web app and uses Grunt to compile code), I would like to use grunt via this plugin within gradle. I would like to know what would be best way to use this plugin inside that sub project?
Following is my test code:
project('webApp') {
task compileWebApp(type: GruntTask, dependsOn: 'copyPackage') {
//Compile web app
doLast {
grunt_build
grunt_compile.dependsOn('grunt_build')
println 'In compileWebApp task.'
}
}
}
When I compile this code it throws error: > Task with path ‘nodeSetup’ not found in project ‘webApp’.
Can anyone let me know what would be best way to use the plugin inside a subproject? Thanks.