From 2e10cc8e9ce903af358a3faf6cbd38028182e465 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Thu, 5 Dec 2019 10:26:30 -0500 Subject: [PATCH] Add checkstyleVersion Gradle CLI property Related to https://github.com/checkstyle/checkstyle/issues/7306 According to discussion with Checkstyle team, we agreed to give us project for testing their latest changes for regressions to avoid situation like in the mentioned issue with `RequireThis` * We expose a `checkstyleVersion` for Gradle command line to let to provide a Checkstyle version externally. This feature is going to be used on Checkstyle CI to run check in our project against their SNAPSHOT The command to run checks against external version is like this: `./gradlew clean check --parallel -x test -PcheckstyleVersion=[CHECKSTYLE_VERSION]` Where `[CHECKSTYLE_VERSION]` is a placeholder which should be replaced with environment-specific variable or an explicit version. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 140ec6b785..4c14f70419 100644 --- a/build.gradle +++ b/build.gradle @@ -330,7 +330,7 @@ subprojects { subproject -> checkstyle { configFile = file("$rootDir/src/checkstyle/checkstyle.xml") - toolVersion = '8.26' + toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '8.26' } artifacts {