We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8230277 commit 16c491fCopy full SHA for 16c491f
1 file changed
build.gradle
@@ -1,3 +1,7 @@
1
+plugins {
2
+ id "com.diffplug.spotless" version "5.12.4"
3
+}
4
+
5
apply plugin: 'java'
6
apply plugin: 'maven'
7
@@ -48,3 +52,23 @@ wrapper {
48
52
gradleVersion = "6.1.1"
49
53
distributionType = Wrapper.DistributionType.ALL
50
54
}
55
56
+spotless {
57
+ // optional: limit format enforcement to just the files changed by this feature branch
58
+ ratchetFrom 'origin/master'
59
+ format 'misc', {
60
+ // define the files to apply `misc` to
61
+ target '*.gradle', '.gitignore'
62
+ // define the steps to apply to those files
63
64
+ trimTrailingWhitespace()
65
+ indentWithSpaces(2)
66
+ endWithNewline()
67
+ }
68
+ java {
69
+ target 'src/**/*.java'
70
+ // apply google-java-format
71
+ removeUnusedImports()
72
+ googleJavaFormat('1.9')
73
74
0 commit comments