aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2023-08-10 15:16:35 +0100
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2023-09-07 13:50:05 +0000
commita6d2ecd2ff31f2ae6e775a0e2ed437c7968e3e09 (patch)
tree681a44c918d4b4cf047ab1570cf4a9fb04e2c005
parentbff6432d7cd258fb9450de6b22e367ee8dc0305b (diff)
downloadsoong-a6d2ecd2ff31f2ae6e775a0e2ed437c7968e3e09.tar.gz
Replace -bootclasspath and -classpath metalava options with --classpath
Metalava has not differentiated between bootclasspath and classpath for years so this change replaces the use of the two deprecated single hyphen options with `--classpath`. Bug: 295136054 Test: m checkapi (cherry picked from https://android-review.googlesource.com/q/commit:f8aaaa13f4fb87cc0f7bd5231f2334499d174109) Merged-In: I3ab20b76a60cab66a27784b7d87a069813d19835 Change-Id: I3ab20b76a60cab66a27784b7d87a069813d19835
-rw-r--r--java/droidstubs.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 1b258835b..9379b88aa 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -516,12 +516,12 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
FlagWithRspFileInputList("@", android.PathForModuleOut(ctx, "metalava.rsp"), srcs).
FlagWithInput("@", srcJarList)
- if len(bootclasspath) > 0 {
- cmd.FlagWithInputList("-bootclasspath ", bootclasspath.Paths(), ":")
- }
-
- if len(classpath) > 0 {
- cmd.FlagWithInputList("-classpath ", classpath.Paths(), ":")
+ // Metalava does not differentiate between bootclasspath and classpath and has not done so for
+ // years, so it is unlikely to change any time soon.
+ combinedPaths := append(([]android.Path)(nil), bootclasspath.Paths()...)
+ combinedPaths = append(combinedPaths, classpath.Paths()...)
+ if len(combinedPaths) > 0 {
+ cmd.FlagWithInputList("--classpath ", combinedPaths, ":")
}
cmd.Flag("--no-banner").