Automate NDK API coverage used by Mainline modules build integration

Dist txt files containing NDK APIs used by Mainline modules

Test: TARGET_BUILD_APPS=com.google.android.adbd m dist apps_only

Change-Id: I035f1e0cc7eb43fc09e796dbc6ce77e65b8aa3b4
This commit is contained in:
sophiez 2020-12-03 23:53:15 +00:00
parent 8baa8b50a8
commit 55e8815fb8

View file

@ -421,6 +421,15 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
for _, dist := range data.Entries.GetDistForGoals(a) {
fmt.Fprintf(w, dist)
}
if a.coverageOutputPath.String() != "" {
goal := "apps_only"
distFile := a.coverageOutputPath.String()
fmt.Fprintf(w, "ifneq (,$(filter $(my_register_name),$(TARGET_BUILD_APPS)))\n"+
" $(call dist-for-goals,%s,%s:ndk_apis_usedby_apex/$(notdir %s))\n"+
"endif",
goal, distFile, distFile)
}
}
}}
}