gradle-watch-plugin
gradle-watch-plugin copied to clipboard
Using from separate file
Cool plugin. Thanks!
I'm not sure if this is the 'gradle way', but if I wanted to configure this in a separate file, this is what I have to do:
in build.gradle:
apply from: 'watch.gradle'
and in watch.gradle:
import com.bluepapa32.gradle.plugins.watch.WatchPlugin
buildscript {
repositories {
maven {
url "...internal maven repo..."
}
jcenter()
}
dependencies {
classpath 'com.bluepapa32:gradle-watch-plugin:0.1.4'
}
}
apply plugin: WatchPlugin
watch {
custom {
files files('src/main/static')
tasks 'applicationJavascript'
}
}
If you notice, I had to import the WatchPlugin class and apply it that way. Not sure if this is an issue you need to worry about, but in case people wanted to separate out this config... is there a better way? or a more idiomatic gradle way?