Stop using single-hyphen metalava options

`-encoding` and `-source` have been deprecated in metalava.

`-encoding` actually does nothing apart from check to make sure that
the value is `utf-8` (in some case). Metalava always uses `utf-8`.

`-source` has been deprecated in favor of `--java-source` as metalava
also can consume kotlin and it has its own `--kotlin-source` option.

Bug: 295136054
Test: ./gradlew
(cherry picked from https://android-review.googlesource.com/q/commit:808211e519ae43517ae7d6ed5348ffb1e3b63c45)
Merged-In: I08e6931958f40022d65d417360e32b72a1d70444
Change-Id: I08e6931958f40022d65d417360e32b72a1d70444
This commit is contained in:
Paul Duffin
2023-08-09 12:36:08 +01:00
committed by Cherrypicker Worker
parent f1284fd092
commit bff6432d7c
3 changed files with 1 additions and 4 deletions

View File

@@ -1705,7 +1705,6 @@ func metalavaStubCmd(ctx android.ModuleContext, rule *android.RuleBuilder,
cmd.BuiltTool("metalava").ImplicitTool(ctx.Config().HostJavaToolPath(ctx, "metalava.jar")).
Flag(config.JavacVmFlags).
Flag("-J--add-opens=java.base/java.util=ALL-UNNAMED").
FlagWithArg("-encoding ", "UTF-8").
FlagWithInputList("--source-files ", srcs, " ")
cmd.Flag("--no-banner").