예제 #1
0
    def incremental_build(self):
        merge_dex_task = GradleMergeDexTask(self._config['build_cache_dir'],
                                            self._all_modules,
                                            self._project_info)
        aapt_task = GradleAaptTask(
            self.__setup_invoker(self._config['main_project_name']))

        task_list = self._tasks_dictionary.values()
        last_tasks = find_last_tasks(task_list)

        for rtask in find_root_tasks(task_list):
            aapt_task.add_child_task(rtask)

        clean_cache_task = GradleCleanCacheTask(
            self._config['build_cache_dir'], self._project_info)
        sync_client = GradleSyncClient(self._is_art, self._config,
                                       self._project_info, self._all_modules)
        connect_task = android_tools.ConnectDeviceTask(sync_client)
        sync_task = GradleSyncTask(sync_client,
                                   self._config['build_cache_dir'])
        update_stat_task = android_tools.UpdateStatTask(
            self._config, self._changed_files['projects'])

        map(lambda task: task.add_child_task(merge_dex_task), last_tasks)
        connect_task.add_child_task(sync_task)
        merge_dex_task.add_child_task(sync_task)
        sync_task.add_child_task(clean_cache_task)
        clean_cache_task.add_child_task(update_stat_task)

        # self._task_engine.add_root_task(find_root_tasks(task_list))
        self._task_engine.add_root_task(aapt_task)
        self._task_engine.add_root_task(connect_task)
        self._task_engine.start()
예제 #2
0
    def incremental_build(self):
        merge_dex_task = GradleMergeDexTask(self._config['build_cache_dir'], self._all_modules, self._project_info)
        aapt_task = GradleAaptTask(self.__setup_invoker(self._config['main_project_name']))

        task_list = self._tasks_dictionary.values()
        last_tasks = find_last_tasks(task_list)

        for rtask in find_root_tasks(task_list):
            aapt_task.add_child_task(rtask)

        clean_cache_task = GradleCleanCacheTask(self._config['build_cache_dir'], self._project_info)
        sync_client = GradleSyncClient(self._is_art, self._config, self._project_info, self._all_modules)
        connect_task = android_tools.ConnectDeviceTask(sync_client)
        sync_task = GradleSyncTask(sync_client, self._config['build_cache_dir'])
        update_stat_task = android_tools.UpdateStatTask(self._config, self._changed_files['projects'])

        map(lambda task: task.add_child_task(merge_dex_task), last_tasks)
        connect_task.add_child_task(sync_task)
        merge_dex_task.add_child_task(sync_task)
        sync_task.add_child_task(clean_cache_task)
        clean_cache_task.add_child_task(update_stat_task)

        # self._task_engine.add_root_task(find_root_tasks(task_list))
        self._task_engine.add_root_task(aapt_task)
        self._task_engine.add_root_task(connect_task)
        self._task_engine.start()