Checkstyle plugin does not work with CS 6.8

We can configure the Checkstyle plugin to use a particular CS version:

checkstyle {
    toolVersion = "6.8"
}

However, this will result in an exception:
java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.CheckStyleTask

This is because CheckStyleTask was renamed to CheckstyleAntTask in version 6.8. The Gradle Checkstyle plugin should try to load the old and new class, too, and use the one which is present.

I’ve raised https://issues.gradle.org/browse/GRADLE-3314 for this. Thanks.