Commit d66fc965 authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Added desugar_jars_paths for java_libraries

Bug: 1151350
Change-Id: I913b01265232168fcf3833bc59f4d343501a75b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2553001
Auto-Submit: Sam Maier <smaier@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829921}
parent 397a12c2
......@@ -21,7 +21,9 @@ def main():
help='Jar input path to include .class files from.')
parser.add_argument('--output-jar', required=True,
help='Jar output path.')
parser.add_argument('--classpath', required=True,
parser.add_argument('--classpath',
action='append',
required=True,
help='Classpath.')
parser.add_argument('--bootclasspath', required=True,
help='Path to javac bootclasspath interface jar.')
......
......@@ -2050,6 +2050,11 @@ if (enable_java_templates) {
"--depfile",
rebase_path(depfile, root_build_dir),
]
if (defined(invoker.desugar_jars_paths)) {
_rebased_desugar_jars_paths =
rebase_path(invoker.desugar_jars_paths, root_build_dir)
args += [ "--classpath=${_rebased_desugar_jars_paths}" ]
}
if (treat_warnings_as_errors) {
args += [ "--warnings-as-errors" ]
}
......@@ -3447,6 +3452,9 @@ if (enable_java_templates) {
# input_jars_paths: Optional list of additional .jar file paths, which will
# be added to the compile-time classpath when building this target (but
# not to the runtime classpath).
# desugar_jars_paths: Optional list of additional .jar file paths, which will
# be added to the desugar classpath when building this target (but not to
# any other classpath). This is only used to break dependency cycles.
# gradle_treat_as_prebuilt: Cause generate_gradle.py to reference this
# library via its built .jar rather than including its .java sources.
# proguard_enabled: Optional. True to enable ProGuard obfuscation.
......@@ -4063,6 +4071,9 @@ if (enable_java_templates) {
enable_desugar = _enable_desugar && enable_bazel_desugar
if (enable_desugar) {
classpath_deps = _full_classpath_deps
if (defined(invoker.desugar_jars_paths)) {
desugar_jars_paths = invoker.desugar_jars_paths
}
}
}
if (defined(invoker.enable_jetify) && invoker.enable_jetify) {
......
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