From 7a867ee058883fb35e3a8db93a4d42285bcb1fc5 Mon Sep 17 00:00:00 2001 From: dejan2609 Date: Sun, 1 Dec 2024 20:35:08 +0100 Subject: [PATCH] KAFKA-12770: introduce `checkstyleVersion` gradle property (for overriding CheckStyle project-defined dependency version) rationale/notes: * useful for experimenting and regression testing * requested by a CheckStyle team so they can add Kafka into their regression suite --- README.md | 1 + gradle/dependencies.gradle | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8423f31f13ebc..7b24660e08058 100644 --- a/README.md +++ b/README.md @@ -177,6 +177,7 @@ You can run checkstyle using: The checkstyle warnings will be found in `reports/checkstyle/reports/main.html` and `reports/checkstyle/reports/test.html` files in the subproject build directories. They are also printed to the console. The build will fail if Checkstyle fails. +For experiments (or regression testing purposes) add `-PcheckstyleVersion=X.y.z` switch (to override project-defined checkstyle version). #### Spotless #### The import order is a part of static check. please call `spotlessApply` to optimize the imports of Java codes before filing pull request. diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 5048bcd3a136a..59b523ed33748 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -61,7 +61,7 @@ versions += [ // when updating checkstyle, check whether the exclusion of // CVE-2023-2976 and CVE-2020-8908 can be dropped from // gradle/resources/dependencycheck-suppressions.xml - checkstyle: "8.36.2", + checkstyle: project.hasProperty('checkstyleVersion') ? checkstyleVersion : "8.36.2", commonsCli: "1.4", commonsIo: "2.14.0", // ZooKeeper dependency. Do not use, this is going away. commonsValidator: "1.9.0",