This is an automated email from the ASF dual-hosted git repository.
francischuang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git
The following commit(s) were added to refs/heads/main by this push:
new b97b819ec [CALCITE-6141] Add `jdk8.checkstyle` property, use
`jdk8.checkstyle` in case of java 8
b97b819ec is described below
commit b97b819ecc6b338df1ea8e6b0ee64604f47ab4a9
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Mon Nov 27 21:30:42 2023 +0100
[CALCITE-6141] Add `jdk8.checkstyle` property, use `jdk8.checkstyle` in
case of java 8
---
.github/workflows/main.yml | 4 ++--
build.gradle.kts | 4 +++-
gradle.properties | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0bd4b92d0..b7ef576c7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -58,7 +58,7 @@ jobs:
fetch-depth: 50
- name: 'Test'
run: |
- ./gradlew --no-parallel --no-daemon tasks build javadoc
-Pcheckstyle.version=9.3
+ ./gradlew --no-parallel --no-daemon tasks build javadoc
linux-jdk8-avatica:
name: 'Linux (JDK 8), Avatica main'
@@ -74,7 +74,7 @@ jobs:
fetch-depth: 50
- name: 'Install Avatica to Maven Local'
run: |
- ./gradlew publishToMavenLocal -Pcalcite.avatica.version=1.0.0-dev-main
-PskipJavadoc -Pcheckstyle.version=9.3
+ ./gradlew publishToMavenLocal -Pcalcite.avatica.version=1.0.0-dev-main
-PskipJavadoc
- name: 'Test Calcite'
run: |
git clone --depth 100 https://github.com/apache/calcite.git ../calcite
diff --git a/build.gradle.kts b/build.gradle.kts
index 374a2a980..b866f0e8f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -209,7 +209,9 @@ allprojects {
if (!skipCheckstyle) {
apply<CheckstylePlugin>()
dependencies {
- checkstyle("com.puppycrawl.tools:checkstyle:${"checkstyle".v}")
+ val checkstyleVersion = if (JavaVersion.current() ==
JavaVersion.VERSION_1_8)
+ "jdk8.checkstyle".v else "checkstyle".v
+ checkstyle("com.puppycrawl.tools:checkstyle:$checkstyleVersion")
}
checkstyle {
// Current one is ~8.8
diff --git a/gradle.properties b/gradle.properties
index 6b59c1c6e..75b24f43b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -51,6 +51,7 @@ org.owasp.dependencycheck.version=5.2.2
# Tools
checkerframework.version=3.10.0
checkstyle.version=10.3.2
+jdk8.checkstyle.version=9.3
spotbugs.version=3.1.11
asm.version=7.1