diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/libwebrtc/build/android/gyp/bundletool.py | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/build/android/gyp/bundletool.py')
-rwxr-xr-x | third_party/libwebrtc/build/android/gyp/bundletool.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/third_party/libwebrtc/build/android/gyp/bundletool.py b/third_party/libwebrtc/build/android/gyp/bundletool.py new file mode 100755 index 0000000000..372e55226d --- /dev/null +++ b/third_party/libwebrtc/build/android/gyp/bundletool.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# Copyright 2018 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Simple wrapper around the bundletool tool. + +Bundletool is distributed as a versioned jar file. This script abstracts the +location and version of this jar file, as well as the JVM invokation.""" + +import logging +import os +import sys + +from util import build_utils + +# Assume this is stored under build/android/gyp/ +BUNDLETOOL_DIR = os.path.abspath(os.path.join( + __file__, '..', '..', '..', '..', 'third_party', 'android_build_tools', + 'bundletool')) + +BUNDLETOOL_VERSION = '1.8.0' + +BUNDLETOOL_JAR_PATH = os.path.join( + BUNDLETOOL_DIR, 'bundletool-all-%s.jar' % BUNDLETOOL_VERSION) + + +def RunBundleTool(args, warnings_as_errors=(), print_stdout=False): + # Use () instead of None because command-line flags are None by default. + verify = warnings_as_errors == () or warnings_as_errors + # ASAN builds failed with the default of 1GB (crbug.com/1120202). + # Bug for bundletool: https://issuetracker.google.com/issues/165911616 + cmd = build_utils.JavaCmd(verify, xmx='4G') + cmd += ['-jar', BUNDLETOOL_JAR_PATH] + cmd += args + logging.debug(' '.join(cmd)) + return build_utils.CheckOutput( + cmd, + print_stdout=print_stdout, + print_stderr=True, + fail_on_output=False, + stderr_filter=build_utils.FilterReflectiveAccessJavaWarnings) + + +if __name__ == '__main__': + RunBundleTool(sys.argv[1:], print_stdout=True) |