Hello All,
I’m trying to get started w/ the gradle-js-plugin using the jshint task and gradle 1.7. I have a definition like
jshint {
source = javascript.source.dev.js.files
def dest = file("${buildDir}/jshint.out")
reporter = 'checkstyle'
jshint.options = [expr: "true", unused: "true"]
}
where “source” seems to be getting the correct file list, however the jshint task is reporting “it has no source files”.
I did see that gradle is giving several warnings re: dynamic properties, but that doesn’t seem to be the issue here.
Can someone please point out what I’m doing wrong here? Complete script listed below.
Thanks!
–john
// Pull the plugin from Maven Central
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.eriwen:gradle-js-plugin:1.5.1'
}
}
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'js'
def jsSrcDir = "source/javascripts"
repositories {
mavenCentral()
}
dependencies {
compile group: 'commons-io', name: 'commons-io', version: '1.4'
compile group: 'log4j', name: 'log4j', version: '1.2.15', ext: 'jar'
}
httpPort = 8080
stopPort = 9451
stopKey = 'foo'
// Declare your sources
javascript.source {
dev {
js {
srcDir jsSrcDir
include "*.js"
exclude "*.min.js"
}
}
prod {
js {
srcDir jsSrcDir
include "*.min.js"
}
}
}
jshint {
source = javascript.source.dev.js.files
def dest = file("${buildDir}/jshint.out")
reporter = 'checkstyle'
jshint.options = [expr: "true", unused: "true"]
}