Latest checkstyle version is 5.7 as of today: http://mvnrepository.com/artifact/com.puppycrawl.tools/checkstyle
With gradle 2.0, it seems this is still not 5.7 (not sure which version is used instead).
This affects new functionalities like here: http://stackoverflow.com/questions/4023185/how-to-disable-a-particular-checkstyle-rule-for-a-particular-line-of-code
<module name="SuppressWarningsFilter" />
<module name="TreeWalker">
<module name="SuppressWarningsHolder" />
Current workaround is to add to build.gradle:
dependencies {
checkstyle('com.puppycrawl.tools:checkstyle:5.7')
}
or with newer guava:
dependencies {
checkstyle('com.puppycrawl.tools:checkstyle:5.7') {
exclude group: 'com.google.guava'
}
checkstyle("com.google.guava:guava:17.0") { force = true }
}
If there is any reason not to use latest checkstyle, at least the checkstyle page could provide an example of how to use a later version, such as the snippet above.