Commit 89a7ef17 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Use .r8dex.jar and .mergeddex.jar rather than .dex.zip

This just renames the extensions in order to make build speed summaries
distinguish the two.

Bug: 1067273
Change-Id: I0a1e14cfed3557d29cd6beb0987436cacfaf6b65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2140908
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757855}
parent 7fc5d60f
......@@ -145,12 +145,12 @@ This step happens only when targets have `supports_android = true`.
This step is skipped when building using [Incremental Install].
When `is_java_debug = true`:
* [d8] merges all library `.dex.jar` files into a final `.dex.zip`.
* [d8] merges all library `.dex.jar` files into a final `.mergeddex.jar`.
When `is_java_debug = false`:
* [R8] performs whole-program optimization on all library `lib.java` `.jar`
files and outputs a final `.dex.zip`.
* For App Bundles, R8 creates a single `.dex.zip` with the code from all
files and outputs a final `.r8dex.jar`.
* For App Bundles, R8 creates a single `.r8dex.jar` with the code from all
modules.
[Incremental Install]: /build/android/incremental_install/README.md
......@@ -160,7 +160,7 @@ When `is_java_debug = false`:
This step happens only when `is_java_debug = false`.
* [dexsplitter.py] splits the single `.dex.zip` into per-module `.dex.zip`
* [dexsplitter.py] splits the single `*dex.jar` into per-module `*dex.jar`
files.
## Test APKs with apk_under_test
......
......@@ -258,7 +258,7 @@ def _ZipMultidex(file_dir, dex_files):
"""
ordered_files = [] # List of (archive name, file name)
for f in dex_files:
if f.endswith('classes.dex.zip'):
if f.endswith('dex.jar'):
ordered_files.append(('classes.dex', f))
break
if not ordered_files:
......
......@@ -101,15 +101,15 @@ def main(args):
if os.path.exists(module_dex_file):
curr_location_to_dest.append((module_dex_file, dest))
else:
module_dex_file += '.zip'
module_dex_file += '.jar'
assert os.path.exists(
module_dex_file), 'Dexsplitter tool output not found.'
curr_location_to_dest.append((module_dex_file + '.zip', dest))
curr_location_to_dest.append((module_dex_file + '.jar', dest))
for curr_location, dest in curr_location_to_dest:
with build_utils.AtomicOutput(dest) as f:
if curr_location.endswith('.zip'):
if dest.endswith('.zip'):
if curr_location.endswith('.jar'):
if dest.endswith('.jar'):
shutil.copy(curr_location, f.name)
else:
with zipfile.ZipFile(curr_location, 'r') as z:
......@@ -119,7 +119,7 @@ def main(args):
options.input_dex_zip)
z.extract(namelist[0], f.name)
else:
if dest.endswith('.zip'):
if dest.endswith('.jar'):
build_utils.ZipDir(
f.name, os.path.abspath(os.path.join(curr_location, os.pardir)))
else:
......
......@@ -2349,7 +2349,7 @@ if (enable_java_templates) {
defined(invoker.static_library_dependent_targets) && _proguard_enabled
if (_is_static_library_provider) {
_static_library_sync_dex_path =
"$_out_dir/static_library_synchronized_proguard.classes.dex.zip"
"$_out_dir/static_library_synchronized_proguard.r8dex.jar"
_resource_ids_provider_deps = []
foreach(_target, invoker.static_library_dependent_targets) {
if (_target.is_resource_ids_provider) {
......@@ -2397,7 +2397,11 @@ if (enable_java_templates) {
if (!_incremental_apk) {
# Bundle modules don't build the dex here, but need to write this path
# to their .build_config file.
_final_dex_path = "$_out_dir/classes.dex.zip"
if (_proguard_enabled) {
_final_dex_path = "$_base_path.r8dex.jar"
} else {
_final_dex_path = "$_base_path.mergeddex.jar"
}
}
_android_manifest =
......
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