summaryrefslogtreecommitdiffstats
path: root/mobile/android/gradle.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /mobile/android/gradle.py
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/gradle.py')
-rw-r--r--mobile/android/gradle.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/mobile/android/gradle.py b/mobile/android/gradle.py
index 9f310ddb7b..51b9313940 100644
--- a/mobile/android/gradle.py
+++ b/mobile/android/gradle.py
@@ -5,10 +5,12 @@
import os
import subprocess
import sys
+import time
from contextlib import contextmanager
import mozpack.path as mozpath
-from mozbuild.util import ensureParentDir, lock_file
+from mozbuild.dirutils import ensureParentDir
+from mozbuild.lock import lock_file
@contextmanager
@@ -27,6 +29,10 @@ def gradle_lock(topobjdir, max_wait_seconds=600):
def android(verb, *args):
+ env = dict(os.environ)
+ should_print_status = env.get("MACH") and not env.get("NO_BUILDSTATUS_MESSAGES")
+ if should_print_status:
+ print("BUILDSTATUS " + str(time.time()) + " START_Gradle " + verb)
import buildconfig
with gradle_lock(buildconfig.topobjdir):
@@ -37,7 +43,6 @@ def android(verb, *args):
verb,
]
cmd.extend(args)
- env = dict(os.environ)
# Confusingly, `MACH` is set only within `mach build`.
if env.get("MACH"):
env["GRADLE_INVOKED_WITHIN_MACH_BUILD"] = "1"
@@ -45,7 +50,9 @@ def android(verb, *args):
del env["LD_LIBRARY_PATH"]
subprocess.check_call(cmd, env=env)
- return 0
+ if should_print_status:
+ print("BUILDSTATUS " + str(time.time()) + " END_Gradle " + verb)
+ return 0
def assemble_app(dummy_output_file, *inputs):