Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5936f74

Browse files
committedAug 18, 2024·
The Spotless Gradle plugin has been added
1 parent 29f7c04 commit 5936f74

File tree

2,160 files changed

+20880
-19338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,160 files changed

+20880
-19338
lines changed
 

‎.github/workflows/gradle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
java-version: '17'
2525
cache: 'gradle'
2626
- name: Build with Gradle
27-
run: chmod +x gradlew && ./gradlew build
27+
run: chmod +x gradlew && ./gradlew spotlessCheck build

‎build.gradle

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'java'
3+
id 'com.diffplug.spotless' version '6.25.0'
34
id 'checkstyle'
45
}
56

@@ -54,3 +55,18 @@ checkstyle {
5455
toolVersion = '6.17'
5556
config = rootProject.resources.text.fromFile('fishercoder_checkstyle.xml')
5657
}
58+
59+
spotless {
60+
java {
61+
encoding 'UTF-8'
62+
target fileTree(projectDir) {
63+
include '**/src/**/*.java'
64+
exclude '**/build/**'
65+
}
66+
importOrder '\\#', '', '*'
67+
removeUnusedImports()
68+
googleJavaFormat('1.22.0').aosp()
69+
toggleOffOn()
70+
endWithNewline()
71+
}
72+
}

0 commit comments

Comments
 (0)
Please sign in to comment.