Skip to content

Commit bde6a61

Browse files
authoredSep 8, 2024··
The Spotless Gradle plugin has been added (#187)
* The Spotless Gradle plugin has been added * Corrected line endings from CRLF to LF
1 parent 4ab9fe5 commit bde6a61

File tree

2,171 files changed

+19348
-17082
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,171 files changed

+19348
-17082
lines changed
 

‎build.gradle

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

67
group = 'com.fishercoder'
@@ -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+
}

‎src/main/java/com/fishercoder/common/classes/Employee.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import java.util.List;
44

55
public class Employee {
6-
/**
6+
/*
77
* It's the unique id of each node;
88
* unique id of this employee
99
*/
1010
public int id;
11-
/**
11+
/*
1212
* the importance value of this employee
1313
*/
1414
public int importance;
15-
/**
15+
/*
1616
* the id of direct subordinates
1717
*/
1818
public List<Integer> subordinates;

0 commit comments

Comments
 (0)
Please sign in to comment.