summaryrefslogtreecommitdiff
path: root/mobile/android/moz.configure
blob: 9f622f6ef455cc56d1b5cb4dfe33926089aba788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# 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/.

project_flag('MOZ_ANDROID_EXCLUDE_FONTS',
             help='Whether to exclude font files from the build',
             default=True)

project_flag('MOZ_LOCALE_SWITCHER',
             help='Enable runtime locale switching',
             default=True)

project_flag('MOZ_ANDROID_GCM',
             help='Enable GCM registration on Nightly builds only',
             default=True,
             set_for_old_configure=True)

project_flag('MOZ_ANDROID_DOWNLOADS_INTEGRATION',
             help='Enable system download manager on Android',
             default=True)

project_flag('MOZ_ANDROID_BEAM',
             help='Enable NFC permission on Android',
             default=True)

project_flag('MOZ_ANDROID_SEARCH_ACTIVITY',
             help='Include Search Activity on Android',
             default=True)

project_flag('MOZ_ANDROID_MLS_STUMBLER',
             help='Include Mozilla Location Service Stumbler on Android',
             default=True)

project_flag('MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE',
             help='Background service for downloading additional content at runtime',
             default=True)

project_flag('MOZ_ANDROID_CUSTOM_TABS',
             help='Enable support for Android custom tabs',
             default=delayed_getattr(milestone, 'is_nightly'))

# Enable the Switchboard A/B framework code.
# Note: The framework is always included in the app. This flag controls
# usage of the framework.
project_flag('MOZ_SWITCHBOARD',
             help='Include Switchboard A/B framework on Android',
             default=True)

option(env='MOZ_ANDROID_ACTIVITY_STREAM',
       help='Enable Activity Stream on Android (replacing the default HomePager)',
       default=False)

set_config('MOZ_ANDROID_ACTIVITY_STREAM',
           depends_if('MOZ_ANDROID_ACTIVITY_STREAM')(lambda _: True))

option(env='MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
       help='Build and package the install bouncer APK',
       default=True)

set_config('MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
           depends_if('MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER')(lambda _: True))

imply_option('MOZ_SERVICES_HEALTHREPORT', True)
imply_option('MOZ_ANDROID_HISTORY', True)

set_config('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')
add_old_configure_assignment('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')

set_config('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0')
add_old_configure_assignment('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0')

@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.')

include('../../toolkit/moz.configure')
include('../../build/moz.configure/java.configure')
include('gradle.configure')