diff options
author | Pete Gillin <peteg@google.com> | 2018-10-22 15:55:04 +0100 |
---|---|---|
committer | Pete Gillin <peteg@google.com> | 2018-11-01 15:28:04 +0000 |
commit | 581d608468aec10a61c95a4732e8b346786fff9b (patch) | |
tree | 4891ea16abc35130214c89b767065ca667168399 /java/androidmk.go | |
parent | 115934e883860be58b5cc7c8e1767be7122a2d37 (diff) | |
download | android_build_soong-581d608468aec10a61c95a4732e8b346786fff9b.tar.gz android_build_soong-581d608468aec10a61c95a4732e8b346786fff9b.tar.bz2 android_build_soong-581d608468aec10a61c95a4732e8b346786fff9b.zip |
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
Diffstat (limited to 'java/androidmk.go')
-rw-r--r-- | java/androidmk.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/androidmk.go b/java/androidmk.go index 0d4edfe7..0700b587 100644 --- a/java/androidmk.go +++ b/java/androidmk.go @@ -454,6 +454,14 @@ func (dstubs *Droidstubs) AndroidMk() android.AndroidMkData { 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) + "_" |