Ver código fonte

Explicitly specify `--api-overloaded-method-order source` for metalava

Previously, `--api-overloaded-method-order source` was the default if
that option was not specified but the other change in this topic is
switching it to `--api-overloaded-method-order signature` to match the
behavior in AndroidX. This change explicitly specifies the option
needed by Soong's use of metalava.

Bug: 285140653
Test: m checkapi
Change-Id: I00e049e0d991e650ab9940a3d495ed2b6e7480f8
Paul Duffin 11 meses atrás
pai
commit
7202ffebf9
2 arquivos alterados com 8 adições e 0 exclusões
  1. 4 0
      java/droidstubs.go
  2. 4 0
      java/java.go

+ 4 - 0
java/droidstubs.go

@@ -539,6 +539,10 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
 	// See b/285140653 for more information.
 	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
 }
 

+ 4 - 0
java/java.go

@@ -1732,6 +1732,10 @@ func metalavaStubCmd(ctx android.ModuleContext, rule *android.RuleBuilder,
 	// See b/285140653 for more information.
 	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
 }