From 83c02bfc388c34d00559f6c850fcce5de868fa91 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 11 Apr 2024 16:21:11 -0700 Subject: [PATCH] Remove intermediate APKs during build process. (flutter/engine#52071) Found that these intermediates added a non-trivial amount of artifacts to the out directory. Folks run our of space because of the size of intermediates sometimes and this just exacerbates that problem. --- .../testing/android/native_activity/native_activity_apk.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/src/flutter/testing/android/native_activity/native_activity_apk.py b/engine/src/flutter/testing/android/native_activity/native_activity_apk.py index 2286d86879..61e8141e6c 100644 --- a/engine/src/flutter/testing/android/native_activity/native_activity_apk.py +++ b/engine/src/flutter/testing/android/native_activity/native_activity_apk.py @@ -110,6 +110,10 @@ def main(): ] run_command_checked(apksigner_command, env=env) + # Remove the intermediates so the out directory isn't full of large files. + os.remove(unaligned_apk_path) + os.remove(unsigned_apk_path) + return 0