33 parser = argparse.ArgumentParser(description='Generate BuildConfig.java for Android')
34 parser.add_argument('--runtime-mode', type=str, required=True)
35 parser.add_argument('--out', type=str, required=True)
36
37 args = parser.parse_args()
38
39 jit_release = 'jit_release' in args.runtime_mode.lower()
40 release = not jit_release and 'release' in args.runtime_mode.lower()
41 profile = 'profile' in args.runtime_mode.lower()
42 debug = 'debug' in args.runtime_mode.lower()
43 assert debug or profile or release or jit_release
44
45 with open(os.path.abspath(args.out), 'w+') as output_file:
46 output_file.write(
47 BUILD_CONFIG_TEMPLATE.format(
51 str(jit_release).
lower()
52 )
53 )
54
55