From 71883fca0256d22f7b624de28f3e124d74a825ed Mon Sep 17 00:00:00 2001 From: Gurpreet Singh Date: Fri, 21 Oct 2022 11:19:12 +0000 Subject: [PATCH] Remove timestamps from api diff files by using labels. The api diff files contain the timestamp of files which are being diffed. This results in different diffs getting generated everytime even if all the APIs are the same. In order to generate same diffs, timestamps have been removed by using the label flag while performing the diff operation. Bug: 238757360 Test: The builds passed and the api diff files does not contain timestamps. Change-Id: If894f5a6632542b566eb0657d22d4c4b2f6afa83 --- build/mainline_modules_sdks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/mainline_modules_sdks.py b/build/mainline_modules_sdks.py index 7c9b853..d8dc06a 100755 --- a/build/mainline_modules_sdks.py +++ b/build/mainline_modules_sdks.py @@ -542,7 +542,8 @@ java_sdk_library_import {{ # so disable the pylint check. # pylint: disable=subprocess-run-check diff = subprocess.run( - ["diff", "-u0", latest_api, extracted_current_api], + ["diff", "-u0", latest_api, extracted_current_api, "--label", latest_api, "--label", + extracted_current_api], capture_output=True).stdout.decode("utf-8") file_object.write(diff)