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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user