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/.
8 "MOZ_ANDROID_EXCLUDE_FONTS",
9 help="Whether to exclude font files from the build",
14 "MOZ_ANDROID_HLS_SUPPORT",
15 help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)",
20 "--num-content-services",
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):
29 intValue = int(strValue)
30 acceptableRange = range(1, 41)
31 if intValue not in acceptableRange:
33 "Unacceptable value, must be within range [%d,%d)"
34 % (acceptableRange.start, acceptableRange.stop)
39 set_config("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
40 set_define("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
43 "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
44 help="Whether to generate content process services with isolatedProcess=true",
50 help="Enable experimental code for Fennec Nightly users. NOTE: This is *not* equivalent "
51 "to the NIGHTLY_BUILD flag set during configure.",
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):
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)
71 def check_target(target):
72 if target.os != "Android":
74 "You must specify --target=arm-linux-androideabi (or some "
75 "other valid Android target) when building mobile/android."
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."
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.
91 env="MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
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"',
98 "MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
99 depends("MOZ_ANDROID_FAT_AAR_ARCHITECTURES")(lambda x: x),