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

Method run_aapt_task

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

Source from the content-addressed store, hash-verified

473 raise NotImplementedError
474
475 def run_aapt_task(self):
476 self._changed_files['res'].append(self._public_xml_path)
477 self._changed_files['res'].append(self._ids_xml_path)
478
479 aapt_args, final_changed_list = self._get_aapt_args()
480 self.debug('aapt exec: ' + ' '.join(aapt_args))
481 st = time.time()
482 output, err, code = cexec(aapt_args, callback=None)
483
484 if code == 0:
485 self.debug('aapt use time: {}ms'.format((time.time() - st) * 1000))
486 self.debug('merged_changed_list:')
487 self.debug(final_changed_list)
488 self._backup_res_changed_list(final_changed_list)
489 self._handle_with_backup_files(True)
490 mark_res_sync_status(self._finder.get_sync_file_path())
491 else:
492 clean_res_build_job_flag(self._finder.get_res_build_job_path())
493 self._handle_with_backup_files(False)
494 rollback_backup_files(self._origin_res_list, self._new_res_list)
495 raise FreelineException('incremental res build failed.', '{}\n{}'.format(output, err))
496
497 def check_r_md5(self):
498 old_md5 = None

Callers 3

executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 11

_get_aapt_argsMethod · 0.95
debugMethod · 0.95
cexecFunction · 0.90
FreelineExceptionClass · 0.90
mark_res_sync_statusFunction · 0.85
clean_res_build_job_flagFunction · 0.85
rollback_backup_filesFunction · 0.85
get_sync_file_pathMethod · 0.80

Tested by

no test coverage detected