Commit 889a439f authored by Justin DeWitt's avatar Justin DeWitt Committed by Commit Bot

JDK Lib Dexer: Ignore keep file if none is generated.

This checks for the existence of the file and skips adding it
as a parameter if it doesn't exist.

Also removes classes from the prebuilt output jar since they
cannot be actually included in the build - they are required
only for the desugaring step.

Bug: 105675
Change-Id: Ib1e86fb25cb4607a18278446c4b35606f179e076
R: agrieve@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363555
Commit-Queue: Justin DeWitt <dewittj@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799503}
parent 6b0d8b63
......@@ -53,7 +53,9 @@ def DexJdkLibJar(r8_path, min_api, desugar_jdk_libs_json, desugar_jdk_libs_jar,
desugar_jdk_libs_json,
]
if keep_rule_file:
# If no desugaring is required, no keep rules are generated, and the keep
# file will not be created.
if keep_rule_file is not None and os.path.exists(keep_rule_file):
cmd += ['--pg-conf', keep_rule_file]
cmd += [
......
......@@ -1138,14 +1138,6 @@ java_prebuilt("com_android_tools_build_jetifier_jetifier_processor_java") {
]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
java_prebuilt("com_android_tools_desugar_jdk_libs_configuration_java") {
jar_path = "libs/com_android_tools_desugar_jdk_libs_configuration/desugar_jdk_libs_configuration-1.0.10.jar"
output_name = "com_android_tools_desugar_jdk_libs_configuration"
supports_android = true
enable_bytecode_checks = false
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("google_play_services_auth_java") {
aar_path = "libs/com_google_android_gms_play_services_auth/play-services-auth-17.0.0.aar"
......
......@@ -36,7 +36,8 @@ class ChromiumDepGraph {
generateTarget: false),
'com_android_tools_desugar_jdk_libs_configuration': new PropertyOverride(
licensePath: "licenses/desugar_jdk_libs_configuration.txt",
licenseName: "BSD 3-Clause"),
licenseName: "BSD 3-Clause",
generateTarget: false),
'backport_util_concurrent_backport_util_concurrent': new PropertyOverride(
licensePath: "licenses/CC01.0.txt",
licenseName: "CC0 1.0"),
......
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