11BUILD_CONFIG_TEMPLATE =
"""
12// Copyright 2013 The Flutter Authors. All rights reserved.
13// Use of this source code is governed by a BSD-style license that can be
14// found in the LICENSE file.
17// THIS FILE IS AUTO_GENERATED
18// DO NOT EDIT THE VALUES HERE - SEE $flutter_root/tools/gen_android_buildconfig.py
21public final class BuildConfig {{
22 private BuildConfig() {{}}
24 public final static boolean DEBUG = {0};
25 public final static boolean PROFILE = {1};
26 public final static boolean RELEASE = {2};
27 public final static boolean JIT_RELEASE = {3};
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)
37 args = parser.parse_args()
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
45 with open(os.path.abspath(args.out),
'w+')
as output_file:
47 BUILD_CONFIG_TEMPLATE.format(
51 str(jit_release).
lower()
56if __name__ ==
'__main__':