Merge "Pretty print SBox manifest files to make them easier to read" into main am: 169cffe526 am: ba810e39c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2786461
Change-Id: I0d501dcde64a6572aab90af0d8872508a27cc68c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/android/rule_builder.go b/android/rule_builder.go
index 1454357..399dfdb 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -629,8 +629,9 @@
name, r.sboxManifestPath.String(), r.outDir.String())
}
- // Create a rule to write the manifest as textproto.
- pbText, err := prototext.Marshal(&manifest)
+ // Create a rule to write the manifest as textproto. Pretty print it by indenting and
+ // splitting across multiple lines.
+ pbText, err := prototext.MarshalOptions{Indent: " "}.Marshal(&manifest)
if err != nil {
ReportPathErrorf(r.ctx, "sbox manifest failed to marshal: %q", err)
}