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 9
9
10
10
package org .elasticsearch .gradle .internal .release ;
11
11
12
+ import com .fasterxml .jackson .core .util .DefaultIndenter ;
13
+ import com .fasterxml .jackson .core .util .DefaultPrettyPrinter ;
12
14
import com .fasterxml .jackson .databind .JsonNode ;
13
15
import com .fasterxml .jackson .databind .ObjectMapper ;
14
16
import com .fasterxml .jackson .databind .node .ArrayNode ;
@@ -128,7 +130,11 @@ public void executeTask() throws IOException {
128
130
updatedBranches .add (objectNode );
129
131
}
130
132
((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 );
132
138
}
133
139
134
140
private List <DevelopmentBranch > readBranches (File branchesFile ) {
You can’t perform that action at this time.
0 commit comments