File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/release Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 99
1010package org .elasticsearch .gradle .internal .release ;
1111
12+ import com .fasterxml .jackson .core .util .DefaultIndenter ;
13+ import com .fasterxml .jackson .core .util .DefaultPrettyPrinter ;
1214import com .fasterxml .jackson .databind .JsonNode ;
1315import com .fasterxml .jackson .databind .ObjectMapper ;
1416import com .fasterxml .jackson .databind .node .ArrayNode ;
@@ -128,7 +130,11 @@ public void executeTask() throws IOException {
128130 updatedBranches .add (objectNode );
129131 }
130132 ((ObjectNode ) jsonNode ).replace ("branches" , updatedBranches );
131- objectMapper .writeValue (branchesFile , jsonNode );
133+
134+ DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter ();
135+ prettyPrinter .indentArraysWith (new DefaultIndenter (" " , DefaultIndenter .SYS_LF ));
136+ prettyPrinter .withoutSpacesInObjectEntries ();
137+ objectMapper .writer (prettyPrinter ).writeValue (branchesFile , jsonNode );
132138 }
133139
134140 private List <DevelopmentBranch > readBranches (File branchesFile ) {
You can’t perform that action at this time.
0 commit comments