if lang != "java":
raise TaskError("Unrecognized android gen lang: {0!r}".format(lang))
process = subprocess.Popen(self.render_args(target, self.workdir))
result = process.wait()
if result != 0:
raise TaskError("Android aapt tool exited non-zero ({code})".format(code=result))
def createtarget(self, lang, gentarget, dependees):
After Change
with self.context.new_workunit(name="aapt_gen", labels=[WorkUnit.MULTITOOL]) as workunit:
returncode = subprocess.call(args, stdout=workunit.output("stdout"),
stderr=workunit.output("stderr"))
if returncode:
raise TaskError("The AaptGen process exited non-zero: {0}".format(returncode))
def createtarget(self, lang, gentarget, dependees):
spec_path = os.path.join(os.path.relpath(self.workdir, get_buildroot()))
address = SyntheticAddress(spec_path=spec_path, target_name=gentarget.id)
aapt_gen_file = self._calculate_genfile(gentarget.package)