2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2016-03-08 07:49:35 +03:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2016-05-12 21:55:58 +03:00
|
|
|
project_flag('MOZ_ANDROID_EXCLUDE_FONTS',
|
|
|
|
help='Whether to exclude font files from the build',
|
|
|
|
default=True)
|
2016-04-22 23:01:21 +03:00
|
|
|
|
2017-05-23 21:51:32 +03:00
|
|
|
project_flag('MOZ_ANDROID_HLS_SUPPORT',
|
|
|
|
help='Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)',
|
2017-11-30 12:46:06 +03:00
|
|
|
default=True)
|
2017-05-23 21:51:32 +03:00
|
|
|
|
2019-05-01 21:37:29 +03:00
|
|
|
option(env='FENNEC_NIGHTLY',
|
|
|
|
help='Enable experimental code for Fennec Nightly users. NOTE: This is *not* equivalent '
|
|
|
|
'to the NIGHTLY_BUILD flag set during configure.',
|
|
|
|
default=False)
|
|
|
|
|
|
|
|
set_config('FENNEC_NIGHTLY', depends_if('FENNEC_NIGHTLY')(lambda _: True))
|
|
|
|
set_define('FENNEC_NIGHTLY', depends_if('FENNEC_NIGHTLY')(lambda _: True))
|
|
|
|
|
2019-05-08 17:33:54 +03:00
|
|
|
|
|
|
|
@depends('FENNEC_NIGHTLY')
|
|
|
|
def fennec_nightly(nightly):
|
|
|
|
return bool(nightly)
|
|
|
|
|
2019-08-07 02:54:34 +03:00
|
|
|
imply_option('MOZ_NORMANDY', False)
|
2016-05-12 21:55:59 +03:00
|
|
|
imply_option('MOZ_SERVICES_HEALTHREPORT', True)
|
2016-05-18 00:40:03 +03:00
|
|
|
imply_option('MOZ_ANDROID_HISTORY', True)
|
2017-12-03 21:44:55 +03:00
|
|
|
imply_option('--enable-small-chunk-size', True)
|
2016-05-12 21:55:59 +03:00
|
|
|
|
2016-04-02 04:39:54 +03:00
|
|
|
@depends(target)
|
|
|
|
def check_target(target):
|
|
|
|
if target.os != 'Android':
|
|
|
|
log.error('You must specify --target=arm-linux-androideabi (or some '
|
|
|
|
'other valid Android target) when building mobile/android.')
|
|
|
|
die('See https://developer.mozilla.org/docs/Mozilla/Developer_guide/'
|
|
|
|
'Build_Instructions/Simple_Firefox_for_Android_build '
|
|
|
|
'for more information about the necessary options.')
|
|
|
|
|
2016-03-08 07:49:35 +03:00
|
|
|
include('../../toolkit/moz.configure')
|
2019-02-02 00:12:51 +03:00
|
|
|
include('../../build/moz.configure/android-sdk.configure')
|
2016-05-12 21:55:57 +03:00
|
|
|
include('../../build/moz.configure/java.configure')
|
2016-03-17 21:04:08 +03:00
|
|
|
include('gradle.configure')
|
2017-05-16 00:37:54 +03:00
|
|
|
|
2019-05-30 18:22:09 +03:00
|
|
|
# Automation will set this via the TC environment.
|
|
|
|
option(env='MOZ_ANDROID_FAT_AAR_ARCHITECTURES',
|
|
|
|
nargs='*', choices=('armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'),
|
|
|
|
help='Comma-separated list of Android CPU architectures like "armeabi-v7a,arm64-v8a,x86,x86_64"')
|
|
|
|
|
|
|
|
set_config('MOZ_ANDROID_FAT_AAR_ARCHITECTURES', depends('MOZ_ANDROID_FAT_AAR_ARCHITECTURES')(lambda x: x))
|