From d1cace255bae6c16182cf3aa8a0274d83de18422 Mon Sep 17 00:00:00 2001 From: zzz701 Date: Thu, 28 Aug 2025 11:20:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=8F=E8=A7=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzz701 --- build-tools/clean_ndk_ani.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build-tools/clean_ndk_ani.py b/build-tools/clean_ndk_ani.py index 94735f25f4c..5457bfc29b5 100755 --- a/build-tools/clean_ndk_ani.py +++ b/build-tools/clean_ndk_ani.py @@ -83,20 +83,21 @@ def clean_ndk_ani_headers(ndk_header_path): process_header_file(file_path) -def clean_json__systemCapability_headers(capability_header_path): +# Clear the ani header file in the systemCapability configuration json file +def clean_json_systemCapability_headers(capability_header_path): try: with open(capability_header_path, 'r') as f: systemCapabilitys = json.load(f) except Exception as e: print(f"Error reading JSON file: {str(e)}") return - + # Traverse all levels of items for _systemCapability in systemCapabilitys: # filtering ani header file - systemCapabilitys[_systemCapability] = [item for item in systemCapabilitys[_systemCapability] - if os.path.basename(item) not in _ANI_HEADER_LISTS] - + systemCapabilitys[_systemCapability] = [item for item in systemCapabilitys[_systemCapability] + if os.path.basename(item) not in _ANI_HEADER_LISTS] + # Saving the modified JSON try: with open(capability_header_path, 'w') as f: @@ -117,9 +118,9 @@ def main(): return clean_ndk_ani_headers(args.ndk_header_path) - clean_json__systemCapability_headers(args.system_capability_header_config) + clean_json_systemCapability_headers(args.system_capability_header_config) print("Ani Header file cleanup complete!") if __name__ == '__main__': - main() + main() \ No newline at end of file -- Gitee