I just changed my Gradle distribution from 3.3 to 3.5 and I am now experiencing errors with the Checkstyle plugin which worked without errors before the upgrade.
The error when running ./gradlew clean checkstyleMain:
:clean
:compileJava
:processResources NO-SOURCE
:classes
:checkstyleMain FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':checkstyleMain'.
> Unable to create a Checker: configLocation {/home/me/repo/repo01/config/checkstyle/checkstyle.xml}, classpath {/home/me/repo/repo01/build/classes/main:/home/me/repo/repo01/build/resources/main}.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
The specific problem here is that OperatorWrap did not support the METHOD_REF token until Checkstyle 7.2. Technically this configuration file is invalid unless you specify Checkstyle version 7.2 or higher.
With Gradle 3.3 (default Checkstyle 5.9), that configuration was still not correct, but you did not receive an error due to looser validation (in Checkstyle, not Gradle). That version only failed on tokens that were completely unknown, not those that were only valid for other rules.
Just tried your Gradle build file (but removed the Springframework) with my XML shown in my other post. There had been a missing quotation mark before the value of the tokens property (fixed now), after this everything runs fine. Does this resolve your problem with my XML config?
Just had a look on the Google Checks file you want to use. The error seems to occur in line 98, means that SeparatorWrap seems to have a problem with the tokens property set to METHOD_REF.
While the docs say that the METHOD_REF token is a valid one, the API docs do not mention it.