aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java')
-rw-r--r--src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java b/src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java
index 0463039fac..b292a65bd1 100644
--- a/src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java
+++ b/src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java
@@ -122,7 +122,7 @@ public class PlistMerging extends Value<PlistMerging> {
}
/**
- * Writes the results of a merge operation to a plist file.
+ * Writes the results of a merge operation to a binary plist file.
* @param plistPath the path of the plist to write in binary format
*/
public PlistMerging writePlist(Path plistPath) throws IOException {
@@ -133,6 +133,17 @@ public class PlistMerging extends Value<PlistMerging> {
}
/**
+ * Writes the results of a merge operation to an XML plist file.
+ * @param plistPath the path of the plist to write in XML format
+ */
+ public PlistMerging writeXmlPlist(Path plistPath) throws IOException {
+ try (OutputStream out = Files.newOutputStream(plistPath)) {
+ PropertyListParser.saveAsXML(merged, out);
+ }
+ return this;
+ }
+
+ /**
* Writes a PkgInfo file based on certain keys in the merged plist.
* @param pkgInfoPath the path of the PkgInfo file to write. In many iOS apps, this file just
* contains the raw string {@code APPL????}.