if isinstance(target, AndroidResources):
gen_out.append(os.path.join(get_buildroot(), target.resource_dir))
target.walk(gather_resources)
args = self.render_args(target, gen_out, input_dirs)
with self.context.new_workunit(name="apk-bundle", labels=[WorkUnit.MULTITOOL]) as workunit:
returncode = subprocess.call(args, stdout=workunit.output("stdout"),
stderr=workunit.output("stderr"))
After Change
for dex in mapping.get(binary):
dex_files.append(dex)
resource_deps = self.context.build_graph.transitive_subgraph_of_addresses([binary.address])
resource_dirs = [t.resource_dir for t in resource_deps if isinstance(t, AndroidResources)]
// Priority for resources is left to right, so reverse the collection order (DFS preorder).
args = self._render_args(binary, reversed(resource_dirs), dex_files)
with self.context.new_workunit(name="apk-bundle",
labels=[WorkUnit.MULTITOOL]) as workunit:
returncode = subprocess.call(args, stdout=workunit.output("stdout"),
stderr=workunit.output("stderr"))