Add check_nullability_warnings support to droidstubs.
This takes the warnings file written by metalava and diffs it against
the expected (checked-in) file, in a manner similar to the checking
and updating of the signature files. This makes it possible for a
developer adding a large API surface (e.g. by moving to a new version
of upstream sources for ojluni) to do so without being blocked on
adding the annotations, while ensuring that at all times there is an
up-to-date record of the API surface which is missing annotations.
Bug: 73448108
Test: See the other change in this topic.
Change-Id: If9ed470ef3355a0d713bb556b5561fb255e4e277
diff --git a/java/androidmk.go b/java/androidmk.go
index 0d4edfe..0700b58 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -454,6 +454,14 @@
fmt.Fprintln(w, dstubs.Name()+"-check-last-released-api:",
dstubs.checkLastReleasedApiTimestamp.String())
}
+ if dstubs.checkNullabilityWarningsTimestamp != nil {
+ fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-nullability-warnings")
+ fmt.Fprintln(w, dstubs.Name()+"-check-nullability-warnings:",
+ dstubs.checkNullabilityWarningsTimestamp.String())
+
+ fmt.Fprintln(w, ".PHONY:", "droidcore")
+ fmt.Fprintln(w, "droidcore: ", dstubs.Name()+"-check-nullability-warnings")
+ }
apiFilePrefix := "INTERNAL_PLATFORM_"
if String(dstubs.properties.Api_tag_name) != "" {
apiFilePrefix += String(dstubs.properties.Api_tag_name) + "_"