1 Star 0 Fork 0

MiHoo / CoordinatorLayout

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
freeline.py 1.58 KB
一键复制 编辑 原始数据 按行查看 历史
596952633@qq.com 提交于 2017-10-27 18:01 . first commit
#!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
from argparse import ArgumentParser
from freeline_core.dispatcher import Dispatcher
from freeline_core.init import init
class Freeline(object):
def __init__(self):
self.dispatcher = Dispatcher()
def call(self, args=None):
if 'init' in args and args.init:
print('init freeline project...')
init()
exit()
self.dispatcher.call_command(args)
def get_parser():
parser = ArgumentParser()
parser.add_argument('-v', '--version', action='store_true', help='show version')
parser.add_argument('-f', '--cleanBuild', action='store_true', help='force to execute a clean build')
parser.add_argument('-w', '--wait', action='store_true', help='make application wait for debugger')
parser.add_argument('-a', '--all', action='store_true',
help="together with '-f', freeline will force to clean build all projects.")
parser.add_argument('-c', '--clean', action='store_true', help='clean cache directory and workspace')
parser.add_argument('-d', '--debug', action='store_true', help='enable debug mode')
parser.add_argument('-i', '--init', action='store_true', help='init freeline project')
parser.parse_args()
return parser
def main():
if sys.version_info > (3, 0):
print 'Freeline only support Python 2.7+ now. Please use the correct version of Python for freeline.'
exit()
parser = get_parser()
args = parser.parse_args()
freeline = Freeline()
freeline.call(args=args)
if __name__ == '__main__':
main()
1
https://gitee.com/Jdbc.dazy/CoordinatorLayoutExample.git
git@gitee.com:Jdbc.dazy/CoordinatorLayoutExample.git
Jdbc.dazy
CoordinatorLayoutExample
CoordinatorLayout
master

搜索帮助