Commit 97b0f657 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Android: Disable jdk library desugaring for webapk.dex

Fixes compile error when enable_jdk_library_desugaring=true

Bug: 1056751
Change-Id: Idb2d4675cefd37931e9f103f79989697407e5f0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2220619Reviewed-by: default avatarSam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773162}
parent 17b517f8
......@@ -993,6 +993,11 @@ if (enable_java_templates) {
_mapping_path = invoker.proguard_mapping_path
}
_enable_jdk_library_desugaring = enable_jdk_library_desugaring
if (defined(invoker.supports_jdk_library_desugaring) &&
!invoker.supports_jdk_library_desugaring) {
_enable_jdk_library_desugaring = false
}
_proguard_sourcefile_suffix = ""
if (defined(invoker.proguard_sourcefile_suffix)) {
_proguard_sourcefile_suffix = "-${invoker.proguard_sourcefile_suffix}"
......@@ -1075,7 +1080,7 @@ if (enable_java_templates) {
]
}
if (enable_jdk_library_desugaring) {
if (_enable_jdk_library_desugaring) {
_args += [
"--desugar-jdk-libs-json",
rebase_path(_desugar_jdk_libs_json, root_build_dir),
......@@ -1272,15 +1277,16 @@ if (enable_java_templates) {
forward_variables_from(invoker,
[
"build_config",
"deps",
"disable_checkdiscard",
"disable_r8_outlining",
"deps",
"is_static_library",
"modules",
"verify_proguard_flags_target_name",
"proguard_mapping_path",
"proguard_sourcefile_suffix",
"is_static_library",
"supports_jdk_library_desugaring",
"testonly",
"verify_proguard_flags_target_name",
])
inputs = []
if (defined(invoker.inputs)) {
......
......@@ -1685,7 +1685,10 @@ if (enable_java_templates) {
])
enable_multidex = false
output = invoker.output
if (!defined(proguard_enabled) || !proguard_enabled) {
if (defined(proguard_enabled) && proguard_enabled) {
# When trying to build a stand-alone .dex, don't add in jdk_libs_dex.
supports_jdk_library_desugaring = false
} else {
_rebased_build_config = rebase_path(_build_config, root_build_dir)
input_dex_filearg =
"@FileArg(${_rebased_build_config}:final_dex:all_dex_files)"
......
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