MCPcopy
hub / github.com/alibaba/freeline / execute

Method execute

freeline_core/android_tools.py:670–690  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

668 self._project_info = project_info
669
670 def execute(self):
671 clean_src_changed_flag(self._cache_dir)
672 for dirpath, dirnames, files in os.walk(self._cache_dir):
673 for fn in files:
674 if fn.endswith('.sync'):
675 os.remove(os.path.join(dirpath, fn))
676 pro = fn.split('.')[0]
677 # refresh ids.xml and public.xml
678 if is_r_changed_flag_exiests(pro, self._cache_dir):
679 self.debug('find R.java has modification, refresh ids.xml and public.xml')
680 finder = DirectoryFinder(pro, self._cache_dir)
681 public_xml_path = finder.get_public_xml_path()
682 ids_xml_path = finder.get_ids_xml_path()
683 generate_public_files_by_r(
684 DirectoryFinder.get_r_file_path(finder.get_dst_r_dir()), public_xml_path, ids_xml_path)
685 # merge_public_file_with_old(public_xml_path, ids_xml_path,
686 # self._project_info[pro]['children_bundle_path'])
687
688 if fn.endswith('increment.dex') or fn.endswith('.rflag') or fn.endswith('.restart') or fn.endswith(
689 'natives.zip'):
690 os.remove(os.path.join(dirpath, fn))
691
692
693def find_r_file(target_dir, package_name=None):

Callers

nothing calls this directly

Calls 9

get_public_xml_pathMethod · 0.95
get_ids_xml_pathMethod · 0.95
get_dst_r_dirMethod · 0.95
clean_src_changed_flagFunction · 0.85
DirectoryFinderClass · 0.85
get_r_file_pathMethod · 0.80
debugMethod · 0.45

Tested by

no test coverage detected