File tree Expand file tree Collapse file tree 2 files changed +22
-16
lines changed
Expand file tree Collapse file tree 2 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,14 @@ jobs:
2323 - name : Validate Gradle wrapper
2424 uses : gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
2525
26- - name : check Java code format
27- uses : axel-op/googlejavaformat-action@v3
28- with :
29- version : " 1.10.0"
30- skipCommit : true
31- args : " --set-exit-if-changed"
32-
33- - name : check Kotlin code format
34- run : ./gradlew ktlintCheck
26+ - name : check Java & Kotlin code format
27+ run : |
28+ ./gradlew spotlessJavaCheck
29+ ./gradlew spotlessKotlinCheck
30+ ./gradlew spotlessKotlinGradleCheck
3531
3632 - name : Prepare test env
37- run : script/prepare-test-env-latest.sh
33+ run : script/prepare-test-env-latest.sh
3834
3935 - name : Build and test with Gradle
4036 run : ./gradlew build
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
1212 id(" signing" )
1313
1414 kotlin(" jvm" ) version " 1.6.10"
15- id(" org.jlleitschuh.gradle.ktlint " ) version " 10 .2.1 "
15+ id(" com.diffplug.spotless " ) version " 6 .2.0 "
1616}
1717
1818group = " io.hstream"
3030 }
3131}
3232
33- // val ktlint by configurations.creating
34-
3533dependencies {
3634 testImplementation(" org.junit.jupiter:junit-jupiter-api:5.7.1" )
3735
@@ -85,9 +83,6 @@ protobuf {
8583 id(" grpc" )
8684 id(" grpckt" )
8785 }
88- // it.builtins {
89- // id("kotlin")
90- // }
9186 }
9287 }
9388}
@@ -173,3 +168,18 @@ tasks.withType<Javadoc> {
173168 )
174169 exclude(" io/hstream/impl/**" , " io/hstream/util/**" )
175170}
171+
172+ spotless {
173+ java {
174+ googleJavaFormat()
175+ }
176+
177+ kotlin {
178+ ktlint()
179+ }
180+
181+ kotlinGradle {
182+ target(" *.gradle.kts" )
183+ ktlint()
184+ }
185+ }
You can’t perform that action at this time.
0 commit comments