Commit 4ff35dfa authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by Commit Bot

android: Add bundletool and appt2 binaries

Android App Bundle support requires using recent versions
of the bundletool and aapt2 programs, which are not part
of the Android SDK copies used by internal and public
Chrome checkouts at the moment.

Also, these tools are still evolving quickly, and their
latest releases are not part of official Android releases
yet.

To solve this, this CL adds two new directories under
third_party/android_build_tools/, in order to store
their corresponding files.

Note that each tool's binary files are distributed
through DEPS as CIPD packages.

For reference, bundletool is officially distributed from
github (see https://github.com/google/bundletool), and
aapt2 from Google Maven.

Note that in the latter case, our script at
tools/android/roll/android_deps/fetch_all.py cannot
be used, because the corresponding .jar file contains
Linux-specific binaries (executable and libraries), and
our Maven-handling Gradle plugin doesn't know how to
deal with these.

BUG=845405
R=agrieve@chromium.org,jbudorick@chromium.org,thakis@chromium.org,benmason@chromium.org,chromium-third-party@google.com

Change-Id: Id650acb9eb55f361fe18f6aa0995776aee832eec
Reviewed-on: https://chromium-review.googlesource.com/1110225Reviewed-by: default avatarGrace Kloba <klobag@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: David Turner <digit@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569577}
parent a0e62856
......@@ -397,6 +397,28 @@ deps = {
'condition': 'checkout_android_native_support',
},
'src/third_party/android_build_tools/aapt2': {
'packages': [
{
'package': 'chromium/third_party/android_tools_aapt2',
'version': 'version:3.2.0-alpha18-4804415-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_build_tools/bundletool': {
'packages': [
{
'package': 'chromium/third_party/android_tools_bundletool',
'version': 'version:0.4.2-cr0',
},
],
'condition': 'checkout_android',
'dep_type': 'cipd',
},
'src/third_party/android_sdk/public': {
'packages': [
{
......
#!/usr/bin/env python
# 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 os
import subprocess
import sys
# Assume this is stored under build/android/gyp/
BUNDLETOOL_DIR = os.path.abspath(os.path.join(
sys.argv[0], '..', '..', '..', '..', 'third_party', 'android_build_tools',
'bundletool'))
BUNDLETOOL_VERSION = '0.4.2'
BUNDLETOOL_JAR_PATH = os.path.join(
BUNDLETOOL_DIR, 'bundletool-all-%s.jar' % BUNDLETOOL_VERSION)
args = ['java', '-jar', BUNDLETOOL_JAR_PATH] + sys.argv[1:]
subprocess.check_call(args)
......@@ -6,6 +6,9 @@
/adobe/flash/binaries
/adobe/flash/symbols
/amd/
/android_build_tools/aapt2/aapt2
/android_build_tools/aapt2/lib64/*.so
/android_build_tools/bundletool/*.jar
/android_ndk/
/android_sdk/public/
/android_sdk/sources/
......
Name: Android SDK App Bundle related tools
Short Name: Android App bundle tools
Version: 0
License: Apache Version 2.0
License File: NOT_SHIPPED
URL: https://developer.android.com/guide/app-bundle/build
Security Critical: No
Description:
Android App Bundle support requires more recent versions of the
'bundletool' and 'aapt2' build tools than those provided with the
copies of the Android SDK currently used by internal or public
Chrome source checkouts.
This directory contains their binaries, distributed through DEPS
as two CIPD packages. See bundletool/cipd.yaml and aapt2/cipd.yaml
for more details.
Local Modifications:
None
This diff is collapsed.
digit@chromium.org
agrieve@chromium.org
jbudorick@chromium.org
Name: Android SDK tool aapt2
Short name: aapt2
Version: 3.2.0-alpha18-4804415
URL: https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/${Version}/aapt2-${Version}-linux.jar
Security Critical: no
License: Apache Version 2.0
License file: NOT_SHIPPED
Description:
The Linux host aapt2 tool is now released on Google Maven, however as a .jar
file that contains host-specific binaries, which must be extracted. They are
distributed here as a CIPD package instead. See cipd.yaml for details.
Local Modifications:
None
# 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.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:3.2.0-alpha18-4804415-cr0
package: chromium/third_party/android_tools_aapt2
description: Android SDK tool to build App Bundles
data:
- file: aapt2
- file: lib64/libc++.so
This diff is collapsed.
digit@chromium.org
agrieve@chromium.org
jbudorick@chromium.org
Name: Android SDK bundletool
Short Name: bundletool
Version: 0.4.2
License: Apache Version 2.0
License File: NOT_SHIPPED
Security Critical: No
URL: https://github.com/google/bundletool
Description:
Bundletool is a tool to manipulate Android App Bundles.
It is distributed here as a CIPD package. See cipd.yaml for details.
Local Modifications:
None
# 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.
# To create CIPD package run the following command.
# cipd create --pkg-def cipd.yaml -tag version:0.4.2-cr0
package: chromium/third_party/android_tools_bundletool
description: Android SDK tool to manage App Bundles
data:
- file: bundletool-all-0.4.2.jar
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment