DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (c2593a3058af)

VCS Links

Line Code
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 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
# -*- Mode: python; c-basic-offset: 4; 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/.

with Files('**'):
    BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')

with Files('*.java.*'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('*Manifest*'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('adjust-sdk-sandbox.token'):
    BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')

with Files('pocket-api-sandbox.token'):
    BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')

with Files('crashreporter/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('java/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('java/org/mozilla/gecko/activitystream/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Awesomescreen')

with Files('java/org/mozilla/gecko/cleanup/**'):
    BUG_COMPONENT = ('Android Background Services', 'Firefox Health Report Service')

with Files('java/org/mozilla/gecko/distribution/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Distributions')

with Files('java/org/mozilla/gecko/firstrun/**'):
    BUG_COMPONENT = ('Firefox for Android', 'First Run')

with Files('java/org/mozilla/gecko/home/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Awesomescreen')

with Files('java/org/mozilla/gecko/icons/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Favicon Handling')

with Files('java/org/mozilla/gecko/mdns/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('java/org/mozilla/gecko/media/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Audio/Video')

with Files('java/org/mozilla/gecko/mdns/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Settings and Preferences')

with Files('java/org/mozilla/gecko/reader/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Reader View')

with Files('java/org/mozilla/gecko/restrictions/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Family Friendly Browsing')

with Files('java/org/mozilla/gecko/telemetry/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Metrics')

with Files('java/org/mozilla/gecko/text/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('java/org/mozilla/gecko/webapps/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Web Apps')

with Files('java/org/mozilla/gecko/*LocaleManager*'):
    BUG_COMPONENT = ('Firefox for Android', 'Locale switching and selection')

with Files('java/org/mozilla/gecko/*ChromeCast*'):
    BUG_COMPONENT = ('Firefox for Android', 'Screencasting')

with Files('java/org/mozilla/gecko/*DynamicToolbar*'):
    BUG_COMPONENT = ('Firefox for Android', 'Graphics, Panning and Zooming')

with Files('java/org/mozilla/gecko/*Presentation*'):
    BUG_COMPONENT = ('Firefox for Android', 'Screencasting')

with Files('java/org/mozilla/gecko/*GuestSession*'):
    BUG_COMPONENT = ('Firefox for Android', 'Profile Handling')

with Files('locales/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('../app/src/*/res/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('../app/src/*/res/anim/**'):
    BUG_COMPONENT = ('Firefox for Android', 'Overlays')

with Files('../app/src/*/res/raw/*favicon*'):
    BUG_COMPONENT = ('Firefox for Android', 'Favicon Handling')

with Files('../app/src/*/res/xml*/*preference*'):
    BUG_COMPONENT = ('Firefox for Android', 'Settings and Preferences')

with Files('../app/src/*/res/menu/**'):
    BUG_COMPONENT = ('Firefox for Android', 'General')

with Files('../app/src/*/res/menu/*home*'):
    BUG_COMPONENT = ('Firefox for Android', 'Awesomescreen')

with Files('../app/src/*/res/menu/*activitystream*'):
    BUG_COMPONENT = ('Firefox for Android', 'Awesomescreen')

with Files('../app/src/*/res/menu/browsersearch_contextmenu.xml'):
    BUG_COMPONENT = ('Firefox for Android', 'Awesomescreen')

DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
FINAL_TARGET_PP_FILES += ['package-name.txt.in']

GENERATED_FILES += [
    'AndroidManifest.xml',
    'generated/preprocessed/org/mozilla/gecko/AdjustConstants.java',
    'generated/preprocessed/org/mozilla/gecko/AppConstants.java',
    'generated/preprocessed/org/mozilla/gecko/CrashReporterConstants.java',
    'generated/preprocessed/org/mozilla/gecko/MmaConstants.java',
]
x = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/AdjustConstants.java']
x.script = 'generate_build_config.py:generate_java'
x.inputs += ['AdjustConstants.java.in']
y = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/AppConstants.java']
y.script = 'generate_build_config.py:generate_java'
y.inputs += ['AppConstants.java.in']
y = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/MmaConstants.java']
y.script = 'generate_build_config.py:generate_java'
y.inputs += ['MmaConstants.java.in']
z = GENERATED_FILES['AndroidManifest.xml']
z.script = 'generate_build_config.py:generate_android_manifest'
z.inputs += ['AndroidManifest.xml.in']

# Generate CrashReporterConstants.java
crash_reporter_constants = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/CrashReporterConstants.java']
crash_reporter_constants.script = '/toolkit/crashreporter/generate_crash_reporter_sources.py:emit_class'
crash_reporter_constants.inputs += ['/toolkit/crashreporter/CrashAnnotations.yaml']

# Regular builds invoke `libs` targets that localize files with no AB_CD set
# into the default resources (res/{values,raw}).
#
# Multi-locale builds invoke `chrome-%` targets that localize files into
# locale-specific resources (res/{values,raw}-AB-rCD).  Single-locale repacks
# invoke `libs AB_CD=$*` targets that localize files into the default resources
# (res/{values,raw}).
#
# Therefore, every localized generated file needs to be written into both the
# default resources (res/{values,raw}) and the locale-specific resources
# (res/{values,raw}-AB-rCD), depending on Make target magic controlled in
# mobile/android/base (for regular builds) and in mobile/android/locales (for
# multi-locale builds and single-locale repacks).  Make target magic ensures
# that res/{values,raw}-AB-rCD is not written for regular en-US builds.

for f in ['res/raw/suggestedsites.json',
          'res/raw{AB_rCD}/suggestedsites.json']:
    LOCALIZED_GENERATED_FILES += [f]
    suggestedsites = LOCALIZED_GENERATED_FILES[f]
    suggestedsites.script = '/python/mozbuild/mozbuild/action/generate_suggestedsites.py'
    suggestedsites.inputs = [
        # The `locales/en-US/` in this path will be rewritten to the
        # locale-specific path.
        '/mobile/locales/en-US/chrome/region.properties',
    ]
    suggestedsites.flags += [
        '--verbose',
        '--android-package-name', CONFIG['ANDROID_PACKAGE_NAME'],
        '--resources', TOPSRCDIR + '/mobile/android/app/src/main/res',
        '--fallback',
        # The `locales/en-US` in this path will not be rewritten.
        TOPSRCDIR + '/mobile/locales/en-US/chrome/region.properties',
    ]

for f in ['res/values/strings.xml',
          'res/values{AB_rCD}/strings.xml']:
    LOCALIZED_GENERATED_FILES += [f]
    strings = LOCALIZED_GENERATED_FILES[f]
    strings.script = '/python/mozbuild/mozbuild/action/generate_strings_xml.py'
    strings.inputs = [
        'strings.xml.in',
        # The `locales/en-US/` will be rewritten to the locale-specific path.
        'locales/en-US/android_strings.dtd',
        'locales/en-US/sync_strings.dtd',
    ]

# The recursive make backend treats the first output specially: it's passed as
# an open FileAvoidWrite to the invoked script.  That doesn't work well with
# the Gradle task that generates all of the outputs, so we add a dummy first
# output.
t = ('android_apks',
     CONFIG['GRADLE_ANDROID_APP_APK'],
     CONFIG['GRADLE_ANDROID_APP_ANDROIDTEST_APK'])

GENERATED_FILES += [t]
GENERATED_FILES[t].force = True
GENERATED_FILES[t].script = '/mobile/android/gradle.py:assemble_app'
GENERATED_FILES[t].inputs += [
    '!AndroidManifest.xml',
    '!generated/preprocessed/org/mozilla/gecko/AdjustConstants.java',
    '!generated/preprocessed/org/mozilla/gecko/AppConstants.java',
    '!generated/preprocessed/org/mozilla/gecko/CrashReporterConstants.java',
    '!generated/preprocessed/org/mozilla/gecko/MmaConstants.java',
    # These all depend on AB_CD, which isn't captured in this definition.  Due
    # to subtle RecursiveMake details, everything works out.  In the future we
    # can try to express the APKs themselves as LOCALIZED_GENERATED_FILES.
    '!res/raw/suggestedsites.json',
    '!res/values/strings.xml',
]