From e5f35b6f87545424feb4f4fa278a1f26bb09821f Mon Sep 17 00:00:00 2001 From: Bill Peckham Date: Fri, 26 Feb 2021 15:54:17 -0800 Subject: [PATCH] Sort properties to ease comparison. You might want to compare generated Android.bp files from different snapshots or different points in time on the same snapshot. Sorting the properties makes this easier. Test: manually compare different Android.bp files Change-Id: I68beea856620f14b879cbf3148cab62dd991a67b --- vendor_snapshot/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor_snapshot/update.py b/vendor_snapshot/update.py index b3fddf4b5..8c99dba74 100644 --- a/vendor_snapshot/update.py +++ b/vendor_snapshot/update.py @@ -50,7 +50,7 @@ def get_variation(json_rel_path): # convert .bp prop dictionary to .bp prop string def gen_bp_prop(prop, ind): bp = '' - for key in prop: + for key in sorted(prop): val = prop[key] # Skip empty list or dict, rather than printing empty prop like