Revert "Remove create_stubs and checkapi from droiddoc"

This reverts commit 3a55c91f9d.

Reason for revert: build failed. Guess this is the cause but needs to confirm. Creating a revert per instructions

Change-Id: I30f1c8cd63e5ab84dba5d21ed354a42695c24ec4
This commit is contained in:
Steve Kim
2020-09-01 17:58:01 +00:00
parent 3a55c91f9d
commit 3666c7023f
3 changed files with 260 additions and 60 deletions

View File

@@ -507,14 +507,53 @@ func (jd *Javadoc) AndroidMkEntries() []android.AndroidMkEntries {
func (ddoc *Droiddoc) AndroidMkEntries() []android.AndroidMkEntries {
return []android.AndroidMkEntries{android.AndroidMkEntries{
Class: "JAVA_LIBRARIES",
OutputFile: android.OptionalPathForPath(ddoc.Javadoc.docZip),
OutputFile: android.OptionalPathForPath(ddoc.stubsSrcJar),
Include: "$(BUILD_SYSTEM)/soong_droiddoc_prebuilt.mk",
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
func(entries *android.AndroidMkEntries) {
if ddoc.Javadoc.docZip != nil {
if BoolDefault(ddoc.Javadoc.properties.Installable, true) && ddoc.Javadoc.docZip != nil {
entries.SetPath("LOCAL_DROIDDOC_DOC_ZIP", ddoc.Javadoc.docZip)
}
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !BoolDefault(ddoc.Javadoc.properties.Installable, true))
if ddoc.Javadoc.stubsSrcJar != nil {
entries.SetPath("LOCAL_DROIDDOC_STUBS_SRCJAR", ddoc.Javadoc.stubsSrcJar)
}
},
},
ExtraFooters: []android.AndroidMkExtraFootersFunc{
func(w io.Writer, name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
if ddoc.checkCurrentApiTimestamp != nil {
fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-current-api")
fmt.Fprintln(w, ddoc.Name()+"-check-current-api:",
ddoc.checkCurrentApiTimestamp.String())
fmt.Fprintln(w, ".PHONY: checkapi")
fmt.Fprintln(w, "checkapi:",
ddoc.checkCurrentApiTimestamp.String())
fmt.Fprintln(w, ".PHONY: droidcore")
fmt.Fprintln(w, "droidcore: checkapi")
}
if ddoc.updateCurrentApiTimestamp != nil {
fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-update-current-api")
fmt.Fprintln(w, ddoc.Name()+"-update-current-api:",
ddoc.updateCurrentApiTimestamp.String())
fmt.Fprintln(w, ".PHONY: update-api")
fmt.Fprintln(w, "update-api:",
ddoc.updateCurrentApiTimestamp.String())
}
if ddoc.checkLastReleasedApiTimestamp != nil {
fmt.Fprintln(w, ".PHONY:", ddoc.Name()+"-check-last-released-api")
fmt.Fprintln(w, ddoc.Name()+"-check-last-released-api:",
ddoc.checkLastReleasedApiTimestamp.String())
fmt.Fprintln(w, ".PHONY: checkapi")
fmt.Fprintln(w, "checkapi:",
ddoc.checkLastReleasedApiTimestamp.String())
fmt.Fprintln(w, ".PHONY: droidcore")
fmt.Fprintln(w, "droidcore: checkapi")
}
},
},
}}