Remove _API_FILE variables
There are no known usages of these variables, and many have been
incorrectly set for a long time.
Also convert the <module> phony for api txt to androidmk.
Bug: 152479829
Test: m
Change-Id: Iff355041d88eb59ac47dd19a03e993cf1ce3927e
diff --git a/java/androidmk.go b/java/androidmk.go
index d37eac8..bbf2c33 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -472,34 +472,6 @@
if ddoc.Javadoc.stubsSrcJar != nil {
entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", ddoc.Javadoc.stubsSrcJar)
}
- apiFilePrefix := "INTERNAL_PLATFORM_"
- if String(ddoc.properties.Api_tag_name) != "" {
- apiFilePrefix += String(ddoc.properties.Api_tag_name) + "_"
- }
- if ddoc.apiFile != nil {
- entries.SetPath(apiFilePrefix+"API_FILE", ddoc.apiFile)
- }
- if ddoc.dexApiFile != nil {
- entries.SetPath(apiFilePrefix+"DEX_API_FILE", ddoc.dexApiFile)
- }
- if ddoc.privateApiFile != nil {
- entries.SetPath(apiFilePrefix+"PRIVATE_API_FILE", ddoc.privateApiFile)
- }
- if ddoc.privateDexApiFile != nil {
- entries.SetPath(apiFilePrefix+"PRIVATE_DEX_API_FILE", ddoc.privateDexApiFile)
- }
- if ddoc.removedApiFile != nil {
- entries.SetPath(apiFilePrefix+"REMOVED_API_FILE", ddoc.removedApiFile)
- }
- if ddoc.removedDexApiFile != nil {
- entries.SetPath(apiFilePrefix+"REMOVED_DEX_API_FILE", ddoc.removedDexApiFile)
- }
- if ddoc.exactApiFile != nil {
- entries.SetPath(apiFilePrefix+"EXACT_API_FILE", ddoc.exactApiFile)
- }
- if ddoc.proguardFile != nil {
- entries.SetPath(apiFilePrefix+"PROGUARD_FILE", ddoc.proguardFile)
- }
},
},
ExtraFooters: []android.AndroidMkExtraFootersFunc{
@@ -578,35 +550,18 @@
if dstubs.metadataZip != nil {
entries.SetPath("LOCAL_DROIDDOC_METADATA_ZIP", dstubs.metadataZip)
}
- apiFilePrefix := "INTERNAL_PLATFORM_"
- if String(dstubs.properties.Api_tag_name) != "" {
- apiFilePrefix += String(dstubs.properties.Api_tag_name) + "_"
- }
- if dstubs.apiFile != nil {
- entries.SetPath(apiFilePrefix+"API_FILE", dstubs.apiFile)
- }
- if dstubs.dexApiFile != nil {
- entries.SetPath(apiFilePrefix+"DEX_API_FILE", dstubs.dexApiFile)
- }
- if dstubs.privateApiFile != nil {
- entries.SetPath(apiFilePrefix+"PRIVATE_API_FILE", dstubs.privateApiFile)
- }
- if dstubs.privateDexApiFile != nil {
- entries.SetPath(apiFilePrefix+"PRIVATE_DEX_API_FILE", dstubs.privateDexApiFile)
- }
- if dstubs.removedApiFile != nil {
- entries.SetPath(apiFilePrefix+"REMOVED_API_FILE", dstubs.removedApiFile)
- }
- if dstubs.removedDexApiFile != nil {
- entries.SetPath(apiFilePrefix+"REMOVED_DEX_API_FILE", dstubs.removedDexApiFile)
- }
- if dstubs.exactApiFile != nil {
- entries.SetPath(apiFilePrefix+"EXACT_API_FILE", dstubs.exactApiFile)
- }
},
},
ExtraFooters: []android.AndroidMkExtraFootersFunc{
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
+ if dstubs.apiFile != nil {
+ fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name())
+ fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.apiFile)
+ }
+ if dstubs.removedApiFile != nil {
+ fmt.Fprintf(w, ".PHONY: %s %s.txt\n", dstubs.Name(), dstubs.Name())
+ fmt.Fprintf(w, "%s %s.txt: %s\n", dstubs.Name(), dstubs.Name(), dstubs.removedApiFile)
+ }
if dstubs.checkCurrentApiTimestamp != nil {
fmt.Fprintln(w, ".PHONY:", dstubs.Name()+"-check-current-api")
fmt.Fprintln(w, dstubs.Name()+"-check-current-api:",