No bug - Add |mach android| command. r=me

DONTBUILD NPOTB

This adds a pass-thru |mach android| command.  It's just here to make
it easier to add and remove Android SDK packages: since most folks
don't have the Android tools on their PATH, this saves them having to
root through the object directory to find the path to the tool.

--HG--
extra : commitid : HgCtltLK3V4
extra : rebase_source : 6c7db25c10b643c8fe655976e613c29db7cd0bc4
extra : histedit_source : fd95eb809a901fd3873968117c60966f3f82790c
This commit is contained in:
Nick Alexander 2015-08-26 10:57:49 -07:00
Родитель e664678d95
Коммит 8d71540829
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -39,6 +39,20 @@ and in IntelliJ select File > Import project... and choose
@CommandProvider
class MachCommands(MachCommandBase):
@Command('android', category='devenv',
description='Run the Android package manager tool.',
conditions=[conditions.is_android])
@CommandArgument('args', nargs=argparse.REMAINDER)
def android(self, args):
# Avoid logging the command
self.log_manager.terminal_handler.setLevel(logging.CRITICAL)
return self.run_process(
[os.path.join(self.substs['ANDROID_TOOLS'], 'android')] + args,
pass_thru=True, # Allow user to run gradle interactively.
ensure_exit_code=False, # Don't throw on non-zero exit code.
cwd=mozpath.join(self.topsrcdir))
@Command('gradle', category='devenv',
description='Run gradle.',
conditions=[conditions.is_android])