summaryrefslogtreecommitdiffstats
path: root/mobile/android/base/moz.build
blob: e070e8e4463f303103b36ca1f3c773811f954f97 (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
# -*- 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 = ("GeckoView", "General")

DEFINES["ANDROID_PACKAGE_NAME"] = CONFIG["ANDROID_PACKAGE_NAME"]
# 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",)

GENERATED_FILES += [t]
GENERATED_FILES[t].force = True
GENERATED_FILES[t].script = "/mobile/android/gradle.py:assemble_app"

# The Android APKs are assembled in the `export` tier, which usually occurs
# before the following files are generated. However, mechanisms in `recurse.mk`
# are used to pull the generated files into the `pre-export` tier, so do not
# require an explicit dependency here.
config_keys = (
    "MOZ_ANDROID_CONTENT_SERVICE_COUNT",
    "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
)
flags = ["%s=%s" % (k, CONFIG[k] if CONFIG[k] else "") for k in config_keys]

GeneratedFile(
    ("../geckoview/src/main/AndroidManifest_overlay.xml",),
    script="gen_from_jinja.py",
    inputs=["../geckoview/src/main/AndroidManifest_overlay.jinja"],
    flags=flags,
)

GeneratedFile(
    (
        "../geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.java",
    ),
    script="gen_from_jinja.py",
    inputs=[
        "../geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.jinja"
    ],
    flags=flags,
)