Flutter Engine
The Flutter Engine
Functions | Variables
android_sdk_linux.create_and_upload Namespace Reference

Functions

def main ()
 

Variables

 FILE_DIR = os.path.dirname(os.path.abspath(__file__))
 
 ASSET = os.path.basename(FILE_DIR)
 

Function Documentation

◆ main()

def android_sdk_linux.create_and_upload.main ( )

Definition at line 24 of file create_and_upload.py.

24def main():
25 parser = argparse.ArgumentParser()
26 parser.add_argument('--android_sdk_root')
27 args = parser.parse_args()
28
29 android_sdk_root = args.android_sdk_root
30 if not android_sdk_root:
31 android_sdk_root = (os.environ.get('ANDROID_HOME') or
32 os.environ.get('ANDROID_SDK_ROOT'))
33 if not android_sdk_root:
34 raise Exception('No --android_sdk_root provided and no ANDROID_HOME or '
35 'ANDROID_SDK_ROOT environment variables.')
36
37 os.environ[create.ENV_VAR] = android_sdk_root
38
39 sk = os.path.realpath(os.path.join(
40 FILE_DIR, os.pardir, os.pardir, os.pardir, os.pardir, 'bin', 'sk'))
41 if os.name == 'nt':
42 sk += '.exe'
43 if not os.path.isfile(sk):
44 raise Exception('`sk` not found at %s; maybe you need to run bin/fetch-sk?')
45
46 # Upload the asset.
47 subprocess.check_call([sk, 'asset', 'upload', ASSET], cwd=FILE_DIR)
48
49

Variable Documentation

◆ ASSET

android_sdk_linux.create_and_upload.ASSET = os.path.basename(FILE_DIR)

Definition at line 21 of file create_and_upload.py.

◆ FILE_DIR

android_sdk_linux.create_and_upload.FILE_DIR = os.path.dirname(os.path.abspath(__file__))

Definition at line 20 of file create_and_upload.py.