I am using https://github.com/eriwen/gradle-js-plugin and i would like to be able run task 'clean'. When i run 'gradle -d clean', it gives the following error
Task 'clean' not found in root project
To my understanding, gradle comes with task - 'clean', however the gradles-js-plugin doesn't seem to support that at this time or something. How do i add the task 'clean'?
Here is my build.gradle:
// Pull the plugin from Maven Central buildscript { repositories { mavenCentral() } dependencies { classpath 'com.eriwen:gradle-js-plugin:1.5.0' } } // Invoke the plugin apply plugin: 'js' def jsSrcDir = 'public/js' javascript.source { dev { js { srcDir jsSrcDir include "*.js" exclude "*.min.js" } } prod { js { srcDir jsSrcDir include "*.min.js" } } } combineJs{ source = fileTree(javascript.source.dev.js.files) dest = file("${buildDir}/all.js") }
The clean task is introduced by the base plugin. So you need to apply this plugin to get the clean task and the clean task rules for cleaning up specific task outputs:
apply plugin:'base'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With