File tree 3 files changed +20
-2
lines changed
src/main/java/org/springframework/boot/build/mavenplugin
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change
1
+ java-baseline=8
Original file line number Diff line number Diff line change 1
- javaFormatVersion =0.0.29
1
+ javaFormatVersion =0.0.31
Original file line number Diff line number Diff line change 38
38
import javax .xml .xpath .XPathExpressionException ;
39
39
import javax .xml .xpath .XPathFactory ;
40
40
41
+ import io .spring .javaformat .config .IndentationStyle ;
42
+ import io .spring .javaformat .config .JavaBaseline ;
43
+ import io .spring .javaformat .config .JavaFormatConfig ;
41
44
import io .spring .javaformat .formatter .FileEdit ;
42
45
import io .spring .javaformat .formatter .FileFormatter ;
43
46
import org .gradle .api .DefaultTask ;
98
101
*/
99
102
public class MavenPluginPlugin implements Plugin <Project > {
100
103
104
+ private static final JavaFormatConfig FORMATTER_CONFIG = new JavaFormatConfig () {
105
+
106
+ @ Override
107
+ public JavaBaseline getJavaBaseline () {
108
+ return JavaBaseline .V8 ;
109
+ }
110
+
111
+ @ Override
112
+ public IndentationStyle getIndentationStyle () {
113
+ return IndentationStyle .TABS ;
114
+ }
115
+
116
+ };
117
+
101
118
@ Override
102
119
public void apply (Project project ) {
103
120
project .getPlugins ().apply (JavaLibraryPlugin .class );
@@ -297,7 +314,7 @@ void setOutputDir(File outputDir) {
297
314
298
315
@ TaskAction
299
316
void syncAndFormat () {
300
- FileFormatter formatter = new FileFormatter ();
317
+ FileFormatter formatter = new FileFormatter (FORMATTER_CONFIG );
301
318
for (File output : this .generator .getOutputs ().getFiles ()) {
302
319
formatter .formatFiles (getProject ().fileTree (output ), StandardCharsets .UTF_8 )
303
320
.forEach ((edit ) -> save (output , edit ));
You can’t perform that action at this time.
0 commit comments