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

Method run_javac_task

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

Source from the content-addressed store, hash-verified

579 os.remove(dex_path)
580
581 def run_javac_task(self):
582 javacargs = [self._javac, '-target', '1.7', '-source', '1.7', '-encoding', 'UTF-8', '-g', '-cp',
583 os.pathsep.join(self._classpaths)]
584 for fpath in self._changed_files['src']:
585 javacargs.append(fpath)
586
587 javacargs.extend(self._extra_javac_args)
588 javacargs.append('-d')
589 javacargs.append(self._finder.get_patch_classes_cache_dir())
590
591 self.debug('javac exec: ' + ' '.join(javacargs))
592 output, err, code = cexec(javacargs, callback=None)
593
594 if code != 0:
595 raise FreelineException('incremental javac compile failed.', '{}\n{}'.format(output, err))
596 else:
597 if self._is_r_file_changed:
598 old_r_file = self._finder.get_dst_r_path(config=self._config)
599 new_r_file = DirectoryFinder.get_r_file_path(self._finder.get_backup_dir())
600 shutil.copyfile(new_r_file, old_r_file)
601 self.debug('copy {} to {}'.format(new_r_file, old_r_file))
602
603 def check_dex_task(self):
604 patch_classes_count = calculate_typed_file_count(self._finder.get_patch_classes_cache_dir(), '.class')

Callers 1

executeMethod · 0.45

Calls 7

debugMethod · 0.95
cexecFunction · 0.90
FreelineExceptionClass · 0.90
get_r_file_pathMethod · 0.80
get_backup_dirMethod · 0.80
get_dst_r_pathMethod · 0.45

Tested by

no test coverage detected