Skip to content

Commit b97b819

Browse files
snuyanzinF21
authored andcommitted
[CALCITE-6141] Add jdk8.checkstyle property, use jdk8.checkstyle in case of java 8
1 parent 7caf7e0 commit b97b819

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
fetch-depth: 50
5959
- name: 'Test'
6060
run: |
61-
./gradlew --no-parallel --no-daemon tasks build javadoc -Pcheckstyle.version=9.3
61+
./gradlew --no-parallel --no-daemon tasks build javadoc
6262
6363
linux-jdk8-avatica:
6464
name: 'Linux (JDK 8), Avatica main'
@@ -74,7 +74,7 @@ jobs:
7474
fetch-depth: 50
7575
- name: 'Install Avatica to Maven Local'
7676
run: |
77-
./gradlew publishToMavenLocal -Pcalcite.avatica.version=1.0.0-dev-main -PskipJavadoc -Pcheckstyle.version=9.3
77+
./gradlew publishToMavenLocal -Pcalcite.avatica.version=1.0.0-dev-main -PskipJavadoc
7878
- name: 'Test Calcite'
7979
run: |
8080
git clone --depth 100 https://github.com/apache/calcite.git ../calcite

build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ allprojects {
209209
if (!skipCheckstyle) {
210210
apply<CheckstylePlugin>()
211211
dependencies {
212-
checkstyle("com.puppycrawl.tools:checkstyle:${"checkstyle".v}")
212+
val checkstyleVersion = if (JavaVersion.current() == JavaVersion.VERSION_1_8)
213+
"jdk8.checkstyle".v else "checkstyle".v
214+
checkstyle("com.puppycrawl.tools:checkstyle:$checkstyleVersion")
213215
}
214216
checkstyle {
215217
// Current one is ~8.8

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ org.owasp.dependencycheck.version=5.2.2
5151
# Tools
5252
checkerframework.version=3.10.0
5353
checkstyle.version=10.3.2
54+
jdk8.checkstyle.version=9.3
5455
spotbugs.version=3.1.11
5556

5657
asm.version=7.1

0 commit comments

Comments
 (0)