Merge "Revert "Revert "Automated NDK API coverage used by Mainline modules build integration."""

This commit is contained in:
Sophie Zheng
2021-01-26 00:13:46 +00:00
committed by Gerrit Code Review
4 changed files with 83 additions and 6 deletions

View File

@@ -450,12 +450,21 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
fmt.Fprintf(w, dist)
}
if a.coverageOutputPath.String() != "" {
if a.apisUsedByModuleFile.String() != "" {
goal := "apps_only"
distFile := a.coverageOutputPath.String()
distFile := a.apisUsedByModuleFile.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",
"endif\n",
goal, distFile, distFile)
}
if a.apisBackedByModuleFile.String() != "" {
goal := "apps_only"
distFile := a.apisBackedByModuleFile.String()
fmt.Fprintf(w, "ifneq (,$(filter $(my_register_name),$(TARGET_BUILD_APPS)))\n"+
" $(call dist-for-goals,%s,%s:ndk_apis_backedby_apex/$(notdir %s))\n"+
"endif\n",
goal, distFile, distFile)
}
}