Bug 1690340 - Part 4: Insert the "Page Source" before the "Extensions for Developers...
[gecko.git] / mobile / android / moz.configure
bloba1d3f4e65c4826af91f4ac7ffce8ac118c0b4d8d
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 project_flag(
8     "MOZ_ANDROID_EXCLUDE_FONTS",
9     help="Whether to exclude font files from the build",
10     default=True,
13 project_flag(
14     "MOZ_ANDROID_HLS_SUPPORT",
15     help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)",
16     default=True,
19 option(
20     "--num-content-services",
21     default="40",
22     help="The number of content process services to generate in the GeckoView manifest",
26 @depends("--num-content-services")
27 def num_content_services(value):
28     strValue = value[0]
29     intValue = int(strValue)
30     acceptableRange = range(1, 41)
31     if intValue not in acceptableRange:
32         die(
33             "Unacceptable value, must be within range [%d,%d)"
34             % (acceptableRange.start, acceptableRange.stop)
35         )
36     return strValue
39 set_config("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
40 set_define("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
42 project_flag(
43     "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
44     help="Whether to generate content process services with isolatedProcess=true",
45     default=False,
48 option(
49     env="FENNEC_NIGHTLY",
50     help="Enable experimental code for Fennec Nightly users. NOTE: This is *not* equivalent "
51     "to the NIGHTLY_BUILD flag set during configure.",
52     default=False,
55 set_config("FENNEC_NIGHTLY", depends_if("FENNEC_NIGHTLY")(lambda _: True))
56 set_define("FENNEC_NIGHTLY", depends_if("FENNEC_NIGHTLY")(lambda _: True))
59 @depends("FENNEC_NIGHTLY")
60 def fennec_nightly(nightly):
61     return bool(nightly)
64 imply_option("MOZ_NORMANDY", False)
65 imply_option("MOZ_SERVICES_HEALTHREPORT", True)
66 imply_option("MOZ_ANDROID_HISTORY", True)
67 imply_option("--enable-small-chunk-size", True)
70 @depends(target)
71 def check_target(target):
72     if target.os != "Android":
73         log.error(
74             "You must specify --target=arm-linux-androideabi (or some "
75             "other valid Android target) when building mobile/android."
76         )
77         die(
78             "See https://developer.mozilla.org/docs/Mozilla/Developer_guide/"
79             "Build_Instructions/Simple_Firefox_for_Android_build "
80             "for more information about the necessary options."
81         )
84 include("../../toolkit/moz.configure")
85 include("../../build/moz.configure/android-sdk.configure")
86 include("../../build/moz.configure/java.configure")
87 include("gradle.configure")
89 # Automation will set this via the TC environment.
90 option(
91     env="MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
92     nargs="*",
93     choices=("armeabi-v7a", "arm64-v8a", "x86", "x86_64"),
94     help='Comma-separated list of Android CPU architectures like "armeabi-v7a,arm64-v8a,x86,x86_64"',
97 set_config(
98     "MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
99     depends("MOZ_ANDROID_FAT_AAR_ARCHITECTURES")(lambda x: x),