Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2467)

Unified Diff: build/android/gyp/util/proguard_util.py

Issue 2928733002: android: Make proguard .flags file more diff-friendly (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/proguard_util.py
diff --git a/build/android/gyp/util/proguard_util.py b/build/android/gyp/util/proguard_util.py
index 6fc57d9f160142cb23ea91a26b4f2378717c9060..be6eae2cab9c6ec5ab97e702f405597e3d65e106 100644
--- a/build/android/gyp/util/proguard_util.py
+++ b/build/android/gyp/util/proguard_util.py
@@ -163,12 +163,16 @@ class ProguardCmdBuilder(object):
def _WriteFlagsFile(self, out):
# Quite useful for auditing proguard flags.
- for config in self._configs:
+ for config in sorted(self._configs):
out.write('#' * 80 + '\n')
out.write(config + '\n')
out.write('#' * 80 + '\n')
with open(config) as config_file:
- out.write(config_file.read().rstrip())
+ contents = config_file.read().rstrip()
+ # Remove numbers from generated rule comments to make file more
+ # diff'able.
+ contents = re.sub(r' #generated:\d+', '', contents)
+ out.write(contents)
out.write('\n\n')
out.write('#' * 80 + '\n')
out.write('Command-line\n')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698