summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-08-31 09:45:30 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-08-31 09:45:30 +0000
commitc09e38de009046c919ba9d7a0606d4494adff39e (patch)
tree094b26704bcda9f04be4f13d895ebcbbb8a1d14e /java/java.go
parent37aa33fcb1d1e7de18534ecebf7cd63825b8c201 (diff)
parent336b16a32524546ec871455c3eada74ad4c446d2 (diff)
Merge "Remove unnecessary options when generating stubs from signatures" into main
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/java/java.go b/java/java.go
index 6c448a2f0..521aef301 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1735,7 +1735,6 @@ func metalavaStubCmd(ctx android.ModuleContext, rule *android.RuleBuilder,
cmd.Flag("--color").
Flag("--quiet").
- Flag("--format=v2").
Flag("--include-annotations").
// The flag makes nullability issues as warnings rather than errors by replacing
// @Nullable/@NonNull in the listed packages APIs with @RecentlyNullable/@RecentlyNonNull,
@@ -1747,14 +1746,13 @@ func metalavaStubCmd(ctx android.ModuleContext, rule *android.RuleBuilder,
FlagWithArg("--hide ", "InvalidNullabilityOverride").
FlagWithArg("--hide ", "ChangedDefault")
- // Force metalava to ignore classes on the classpath when an API file contains missing classes.
- // See b/285140653 for more information.
+ // The main purpose of the `--api-class-resolution api` option is to force metalava to ignore
+ // classes on the classpath when an API file contains missing classes. However, as this command
+ // does not specify `--classpath` this is not needed for that. However, this is also used as a
+ // signal to the special metalava code for generating stubs from text files that it needs to add
+ // some additional items into the API (e.g. default constructors).
cmd.FlagWithArg("--api-class-resolution ", "api")
- // Force metalava to sort overloaded methods by their order in the source code.
- // See b/285312164 for more information.
- cmd.FlagWithArg("--api-overloaded-method-order ", "source")
-
return cmd
}
@@ -1916,7 +1914,7 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
FlagWithArg("-C ", stubsDir.String()).
FlagWithArg("-D ", stubsDir.String())
- rule.Build("metalava", "metalava merged")
+ rule.Build("metalava", "metalava merged text")
if depApiSrcsStubsJar == nil {
var flags javaBuilderFlags