forked from rockcrafters/java-rockcraft-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rockcrafters#6 from vpa1977/fix_generation
feat: order rockcraft.yaml tags
- Loading branch information
Showing
1 changed file
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,11 +101,26 @@ protected String createRockcraft(Path root, List<File> files) throws IOException | |
rockcraft.put("base", "bare"); | ||
rockcraft.put("build-base", "[email protected]"); | ||
|
||
DumperOptions options = new DumperOptions(); | ||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); | ||
Yaml yaml = new Yaml(options); | ||
|
||
StringBuilder yamlOutput = new StringBuilder(); | ||
yamlOutput.append(yaml.dump(rockcraft)); | ||
yamlOutput.append("\n"); | ||
rockcraft.clear(); | ||
|
||
rockcraft.put("services", getProjectService(relativeJars)); | ||
yamlOutput.append(yaml.dump(rockcraft)); | ||
yamlOutput.append("\n"); | ||
rockcraft.clear(); | ||
|
||
rockcraft.put("parts", getProjectParts(filtered, relativeJars)); | ||
yamlOutput.append(yaml.dump(rockcraft)); | ||
yamlOutput.append("\n"); | ||
rockcraft.clear(); | ||
|
||
return new Yaml().dump(rockcraft); | ||
return yamlOutput.toString(); | ||
} | ||
|
||
private Map<String, Object> getPlatforms() { | ||
|